summaryrefslogtreecommitdiff
path: root/dotbot
diff options
context:
space:
mode:
authorAnish Athalye <me@anishathalye.com>2020-06-25 15:56:42 -0400
committerAnish Athalye <me@anishathalye.com>2020-06-25 16:07:23 -0400
commitc5e709d433bdd6694ad68b67978b655a57f740df (patch)
tree533bcf577b1fff6651c30fff23aea96cd2aa5226 /dotbot
parent043373ea74f85ff3c55a9c9f4eeb13ad7d694e71 (diff)
Make error for empty config a little friendlier
In the setup guide in the README, we have people start out with an empty file (created using `touch`). Before this patch, Dotbot gave the following error: Configuration file must be a list of tasks Instead, with this patch, Dotbot says: Configuration file is empty, no work to do This change was prompted by https://github.com/anishathalye/dotbot/pull/226.
Diffstat (limited to 'dotbot')
-rw-r--r--dotbot/cli.py3
1 files changed, 3 insertions, 0 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: