summaryrefslogtreecommitdiff
path: root/dotbot/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'dotbot/cli.py')
-rw-r--r--dotbot/cli.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/dotbot/cli.py b/dotbot/cli.py
index 0795d40..b09461e 100644
--- a/dotbot/cli.py
+++ b/dotbot/cli.py
@@ -18,6 +18,8 @@ def add_options(parser):
help='suppress most output')
parser.add_argument('-v', '--verbose', action='store_true',
help='enable verbose output')
+ parser.add_argument('-n', '--dry-run', action='store_true',
+ help='do not actually perform any changes')
parser.add_argument('-d', '--base-directory',
help='execute commands from within BASEDIR',
metavar='BASEDIR')
@@ -97,7 +99,8 @@ def main():
# default to directory of config file
base_directory = os.path.dirname(os.path.abspath(options.config_file))
os.chdir(base_directory)
- dispatcher = Dispatcher(base_directory, only=options.only, skip=options.skip)
+ dispatcher = Dispatcher(base_directory, only=options.only, skip=options.skip,
+ dry_run = options.dry_run)
success = dispatcher.dispatch(tasks)
if success:
log.verbose('\n==> All tasks executed successfully')