From 191e6222dd8704f27be26764e17e9a719314616d Mon Sep 17 00:00:00 2001 From: Olivier Lamothe Date: Mon, 16 Oct 2023 16:10:37 -0400 Subject: [PATCH] pr stuff https://coveord.atlassian.net/browse/CDX-665 --- packages/cli/core/src/commands/auth/token.spec.ts | 10 +++++----- packages/cli/core/src/commands/auth/token.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/cli/core/src/commands/auth/token.spec.ts b/packages/cli/core/src/commands/auth/token.spec.ts index 4dc0fc20c1..366102e575 100644 --- a/packages/cli/core/src/commands/auth/token.spec.ts +++ b/packages/cli/core/src/commands/auth/token.spec.ts @@ -69,7 +69,7 @@ describe('auth:token', () => { test .stdout() .stderr() - .stub(CliUx.ux, 'prompt', () => async () => 'someToken') + .stub(CliUx.ux, 'prompt', () => () => 'someToken') .command(['auth:token', '-e', environment]) .it(`writes the -e=${environment} flag to the configuration`, () => { expect(mockConfigSet).toHaveBeenCalledWith('environment', environment); @@ -80,7 +80,7 @@ describe('auth:token', () => { test .stdout() .stderr() - .stub(CliUx.ux, 'prompt', () => async () => 'someToken') + .stub(CliUx.ux, 'prompt', () => () => 'someToken') .command(['auth:token', '-r', region]) .it(`writes the -r=${region} flag and configuration`, () => { expect(mockConfigSet).toHaveBeenCalledWith( @@ -94,7 +94,7 @@ describe('auth:token', () => { test .stdout() .stderr() - .stub(CliUx.ux, 'prompt', () => async () => 'this-is-the-token') + .stub(CliUx.ux, 'prompt', () => () => 'this-is-the-token') .command(['auth:token']) .it('save token from oauth service', () => { expect(mockConfigSet).toHaveBeenCalledWith( @@ -111,7 +111,7 @@ describe('auth:token', () => { .do(() => { mockGetHasAccessToOrg.mockReturnValueOnce(Promise.resolve(true)); }) - .stub(CliUx.ux, 'prompt', () => async () => 'some-token') + .stub(CliUx.ux, 'prompt', () => () => 'some-token') .command(['auth:token']) .it( 'succeed when the organization and the token flags are valid', @@ -128,7 +128,7 @@ describe('auth:token', () => { }) .stdout() .stderr() - .stub(CliUx.ux, 'prompt', () => async () => 'some-token') + .stub(CliUx.ux, 'prompt', () => () => 'some-token') .command(['auth:token']) .it( 'find the org associated with the token and saves it in the config', diff --git a/packages/cli/core/src/commands/auth/token.ts b/packages/cli/core/src/commands/auth/token.ts index 57f3486003..d6c45b75b8 100644 --- a/packages/cli/core/src/commands/auth/token.ts +++ b/packages/cli/core/src/commands/auth/token.ts @@ -22,7 +22,7 @@ export default class Token extends CLICommand { stdin: Flags.boolean({ char: 's', description: - 'Read the token from stdin. Default to true when running in a CI environment.', + 'Whether to read the token from stdin. Default to true when running in a CI environment.', default: process.env.CI === 'true', }), };