summaryrefslogtreecommitdiff
path: root/packages/cli/src/validateNonInterActiveAuth.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/validateNonInterActiveAuth.ts')
-rw-r--r--packages/cli/src/validateNonInterActiveAuth.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/cli/src/validateNonInterActiveAuth.ts b/packages/cli/src/validateNonInterActiveAuth.ts
index a85b7370..7e80b30e 100644
--- a/packages/cli/src/validateNonInterActiveAuth.ts
+++ b/packages/cli/src/validateNonInterActiveAuth.ts
@@ -23,6 +23,7 @@ function getAuthTypeFromEnv(): AuthType | undefined {
export async function validateNonInteractiveAuth(
configuredAuthType: AuthType | undefined,
+ useExternalAuth: boolean | undefined,
nonInteractiveConfig: Config,
) {
const effectiveAuthType = configuredAuthType || getAuthTypeFromEnv();
@@ -34,10 +35,12 @@ export async function validateNonInteractiveAuth(
process.exit(1);
}
- const err = validateAuthMethod(effectiveAuthType);
- if (err != null) {
- console.error(err);
- process.exit(1);
+ if (!useExternalAuth) {
+ const err = validateAuthMethod(effectiveAuthType);
+ if (err != null) {
+ console.error(err);
+ process.exit(1);
+ }
}
await nonInteractiveConfig.refreshAuth(effectiveAuthType);