Skip to content

Commit

Permalink
try with force stdin false
Browse files Browse the repository at this point in the history
  • Loading branch information
olamothe committed Oct 17, 2023
1 parent 458b52d commit ffa2f1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/cli/core/src/commands/auth/token.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('auth:token', () => {
.stdout()
.stderr()
.stub(CliUx.ux, 'prompt', () => () => 'this-is-the-token')
.command(['auth:token'])
.command(['auth:token', '--no-stdin'])
.it('save token from oauth service', () => {
expect(mockConfigSet).toHaveBeenCalledWith(
'accessToken',
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/core/src/commands/auth/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ export default class Token extends CLICommand {
...withEnvironment(),
stdin: Flags.boolean({
char: 's',
description: 'Whether to read the token from stdin.',
default: false,
description:
'Whether to read the token from stdin. Default to true when running in a CI environment.',
default: process.env.CI === 'true',
}),
};

Expand Down

0 comments on commit ffa2f1c

Please sign in to comment.