mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-29 14:06:14 +02:00
Nicer error message when there is a syntactical error in your config file.
This commit is contained in:
parent
ac7a882142
commit
90863ecee1
2 changed files with 8 additions and 1 deletions
|
@ -150,7 +150,12 @@ def cli():
|
|||
config = install.install_jrnl(CONFIG_PATH)
|
||||
else:
|
||||
with open(CONFIG_PATH) as f:
|
||||
config = json.load(f)
|
||||
try:
|
||||
config = json.load(f)
|
||||
except ValueError as e:
|
||||
print("[There seems to be something wrong with your jrnl config at {}: {}]".format(CONFIG_PATH, e.message))
|
||||
print("[Entry was NOT added to your journal]")
|
||||
sys.exit(-1)
|
||||
install.update_config(config, config_path=CONFIG_PATH)
|
||||
|
||||
original_config = config.copy()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue