summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dotbot/cli.py3
-rw-r--r--test/tests/config-empty.bash4
2 files changed, 5 insertions, 2 deletions
diff --git a/dotbot/cli.py b/dotbot/cli.py
index 258ea87..b400dd6 100644
--- a/dotbot/cli.py
+++ b/dotbot/cli.py
@@ -74,6 +74,9 @@ def main():
log.error('No configuration file specified')
exit(1)
tasks = read_config(options.config_file)
+ if tasks is None:
+ log.warning('Configuration file is empty, no work to do')
+ tasks = []
if not isinstance(tasks, list):
raise ReadingError('Configuration file must be a list of tasks')
if options.base_directory:
diff --git a/test/tests/config-empty.bash b/test/tests/config-empty.bash
index 146d89e..733c156 100644
--- a/test/tests/config-empty.bash
+++ b/test/tests/config-empty.bash
@@ -1,7 +1,7 @@
-test_description='empty config disallowed'
+test_description='empty config allowed'
. '../test-lib.bash'
-test_expect_failure 'run' '
+test_expect_success 'run' '
run_dotbot <<EOF
EOF
'