Change journal name validation

Journal name validation used to happen before postconfig commands could
have a chance to run, so now each command is responsible for its own
error-checking of the journal name.

Added a new decorator and function that makes this error-checking easier.

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
Jonathan Wren 2022-10-22 14:11:32 -07:00
parent 3ac2b95156
commit 2130af2e39
No known key found for this signature in database
7 changed files with 48 additions and 12 deletions

View file

@ -67,7 +67,7 @@ Feature: Multiple journals
Given the config "no_default_journal.yaml" exists
And we use the config "basic_onefile.yaml"
When we run "jrnl --cf no_default_journal.yaml a long day in the office"
Then the output should contain "No default journal configured"
Then the output should contain "No 'default' journal configured"
Scenario: Don't crash if no file exists for a configured encrypted journal using an alternate config
Given the config "multiple.yaml" exists