aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Escande <wescande@google.com>2023-07-12 08:40:23 -0700
committerWilliam Escande <wescande@google.com>2023-07-12 08:40:23 -0700
commitb51e9906c090724203b931f6eafe4ac75d425b65 (patch)
treee39fdd9dbf02c0da769ff5e93be280bcb5623766
parent338af8dede21fe6cfec1b6020ba2a8f5e4b354d7 (diff)
downloadrepohooks-b51e9906c090724203b931f6eafe4ac75d425b65.tar.gz
pre-upload: Ask user confirmation even for 1 hook
By defaulting mode to 'some', the user will have a prompt confirmation before the hook being run. Currently it is run silently by default Bug: None Test: upload change with single hook to run Change-Id: Iacb7cb2b9b5d571ef10e61891545ceebfcf68a8e
-rwxr-xr-xpre-upload.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pre-upload.py b/pre-upload.py
index 59b601a..90d16f1 100755
--- a/pre-upload.py
+++ b/pre-upload.py
@@ -282,7 +282,7 @@ def _attempt_fixes(projects_results: List[rh.results.ProjectResults]) -> None:
# If there's more than one fixup available, ask if they want to blindly run
# them all, or prompt for them one-by-one.
- mode = None
+ mode = 'some'
if len(fixups) > 1:
while True:
response = rh.terminal.str_prompt(