Skip to content

Login doesnt handle no-browser os well #1190

@robindiddams

Description

@robindiddams

After hitting Enter, i got this big error. I was able to login fine, but maybe we should suppress or minimize this.

agentuity auth login

Your login code: XXXX-XXXX

Open this URL in your browser to approve the login:

  https://app.agentuity.com/auth/cli?code=XXXX-XXXX

Press Enter to open in your browser, or Ctrl+C to cancel

◒ Waiting for approval (4m 35s remaining)
115 |                                                   stdout: 'ignore',
116 |                                                   stderr: 'ignore',
117 |                                           });
118 |                                   } else {
119 |                                           const command = platform === 'darwin' ? 'open' : 'xdg-open';
120 |                                           Bun.spawn([command, authURL], { stdout: 'ignore', stderr: 'ignore' });
      ^
error: Executable not found in $PATH: "xdg-open"
  path: "xdg-open",
 errno: -2,
  code: "ENOENT"

      at spawn (unknown:1:1)
      at onEnterPress (/var/agentuity/.bun/install/global/node_modules/@agentuity/cli/src/cmd/auth/login.ts:120:11)
      at keypressListener (/var/agentuity/.bun/install/global/node_modules/@agentuity/cli/src/tui.ts:1429:15)
      at emit (node:events:95:22)
      at addChunk (internal:streams/readable:265:47)
      at readableAddChunkPushByteMode (internal:streams/readable:243:18)
      at internalRead (native:38:40)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions