Open kaylee-kiako opened 3 months ago
Thanks for filing this, @kaylee-kiako. Nice find, and I agree with your analysis.
If anyone would like to submit a PR to fix this, I think a resolution should:
is_old_version
to first check if the version field exists, and if it does, return true if it's less than 2.0. If there is no version, run that json check as it does currently.
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
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.