lib: commandline: add standard --dry-run option
This will allow people to easily opt-in/add standard --dry-run to
their CLIs. We don't opt-in any tools just yet though.
BUG=None
TEST=CQ passes
Change-Id: I2266becdf26a2791786bba3bd56285d62a770af9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4219571
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/cros.py b/scripts/cros.py
index 7dcf51c..e351690 100644
--- a/scripts/cros.py
+++ b/scripts/cros.py
@@ -47,6 +47,7 @@
description=class_def.__doc__,
epilog=epilog,
caching=class_def.use_caching_options,
+ dryrun=class_def.use_dryrun_options,
formatter_class=argparse.RawDescriptionHelpFormatter,
)
class_def.AddParser(sub_parser)