User is always asked to update when config resembles JSON #1908
Labels
bug
Something isn't working
📌
This can't go stale
ready for pr
Okay to start work. Feel free to ask questions.
Milestone
Diagnostic output
Current Behavior
Whenever the config file resembles JSON, the user is prompted to update, regardless of if
version
is set.Expected Behavior
As YAML is a superset of JSON (so this is a valid config), and
"version": "v4.1"
is set, I would expect not to be prompted to update.Repro Steps
{"colors":{"body":"none","date":"black","tags":"yellow","title":"cyan"},"default_hour":9,"default_minute":0,"editor":"hx","encrypt":false,"highlight":true,"indent_character":"|","journals":{"default":{"journal":"~/Documents/jrnl/journal.txt"},"food":{"journal":"~/Documents/jrnl/food.txt"}},"linewrap":79,"tagsymbols":"#@","template":false,"timeformat":"%F %r","version":"v4.1"}
jrnl
.Debug output
Other Information
It appears the culprit is
is_old_version
, which only checks if the config is JSON without considering theversion
field.The text was updated successfully, but these errors were encountered: