-
Notifications
You must be signed in to change notification settings - Fork 34
fix: skip confirmation prompts in non-interactive mode (#443) #462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: skip confirmation prompts in non-interactive mode (#443) #462
Conversation
When --non_interactive flag is used, the CLI was still showing confirmation prompts for execution_address verification, breaking automation workflows. This fix ensures that: 1. The prompt_if conditional prompt is skipped in non-interactive mode 2. The confirmation prompt logic explicitly checks non_interactive flag The fix maintains all security validations while allowing fully automated execution when --non_interactive is enabled. Changes: - Added 'and not config.non_interactive' guard to prompt_if block - Added explicit guard to confirmation prompt logic - Follows the same pattern used in 12+ other locations in the codebase Fixes ethstaker#443
|
Can you provide a command that reproduces this issue? Doing a simple |
seems correct that a simple command with The issue is in To reproduce the issue, omit mkdir -p /tmp/test_keys && python -m ethstaker_deposit \
--non_interactive \
--ignore_connectivity \
existing-mnemonic \
--num_validators 1 \
--keystore_password "testpassword123" \
--folder /tmp/test_keys \
--mnemonic "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about" \
--mnemonic_password ""On |
|
@xjjda22 In your example, there would be a prompt for the I'm not understanding the underlying concern. If the user does not want to set an execution address, they can provide |
It appears this PR is addressing a non-issue. The current implementation already correctly handles non-interactive mode by skipping confirmations while still allowing prompts for missing arguments when appropriate. I'll close this PR since the fix is unnecessary. |
What I did
Fixed Issue #443:
--non_interactiveflag now correctly skips execution address verification prompts.When
--non_interactiveflag is used, the CLI was still showing confirmation prompts for execution_address verification, breaking automation workflows.This fix adds
and not config.non_interactiveguards to prevent prompts from showing in non-interactive mode, following the same pattern used in 12+ other locations in the codebase.Changes:
prompt_ifblock (line 181)Related issue
Fixes #443: #443