mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 14:10:37 -07:00
fix: resolve positional prompt argument being ignored with other flags (#9004)
This commit is contained in:
@@ -505,8 +505,11 @@ export async function loadCliConfig(
|
||||
|
||||
const policyEngineConfig = createPolicyEngineConfig(settings, approvalMode);
|
||||
|
||||
// Fix: If promptWords are provided, always use non-interactive mode
|
||||
const hasPromptWords = argv.promptWords && argv.promptWords.length > 0;
|
||||
const interactive =
|
||||
!!argv.promptInteractive || (process.stdin.isTTY && question.length === 0);
|
||||
!!argv.promptInteractive ||
|
||||
(process.stdin.isTTY && !hasPromptWords && !argv.prompt);
|
||||
// In non-interactive mode, exclude tools that require a prompt.
|
||||
const extraExcludes: string[] = [];
|
||||
if (!interactive && !argv.experimentalAcp) {
|
||||
|
||||
Reference in New Issue
Block a user