POC for --dry-run param in run command

This commit is contained in:
Emmanuel Leblond 2023-11-18 13:44:30 +01:00
parent 2280645d0e
commit 455fc07ad9
No known key found for this signature in database
GPG key ID: C360860E645EFFC0
10 changed files with 40 additions and 10 deletions

View file

@ -60,6 +60,12 @@ def _add_hook_type_option(parser: argparse.ArgumentParser) -> None:
def _add_run_options(parser: argparse.ArgumentParser) -> None:
parser.add_argument('hook', nargs='?', help='A single hook-id to run')
parser.add_argument('--verbose', '-v', action='store_true', default=False)
parser.add_argument(
'--dry-run',
action='store_true',
help='Display the hook commands instead of run them (useful for debugging).',
default=False,
)
mutex_group = parser.add_mutually_exclusive_group(required=False)
mutex_group.add_argument(
'--all-files', '-a', action='store_true', default=False,