fix(admin): Ensure CLI commands run in non-interactive mode (#17218)

This commit is contained in:
Shreya Keshive
2026-01-21 12:38:20 -05:00
committed by GitHub
parent 7399c623d8
commit d0cae4547e
8 changed files with 181 additions and 21 deletions
+6 -6
View File
@@ -373,12 +373,12 @@ export async function main() {
// Refresh auth to fetch remote admin settings from CCPA and before entering
// the sandbox because the sandbox will interfere with the Oauth2 web
// redirect.
if (
settings.merged.security.auth.selectedType &&
!settings.merged.security.auth.useExternal
) {
if (!settings.merged.security.auth.useExternal) {
try {
if (partialConfig.isInteractive()) {
if (
partialConfig.isInteractive() &&
settings.merged.security.auth.selectedType
) {
const err = validateAuthMethod(
settings.merged.security.auth.selectedType,
);
@@ -389,7 +389,7 @@ export async function main() {
await partialConfig.refreshAuth(
settings.merged.security.auth.selectedType,
);
} else {
} else if (!partialConfig.isInteractive()) {
const authType = await validateNonInteractiveAuth(
settings.merged.security.auth.selectedType,
settings.merged.security.auth.useExternal,