You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add --upgrade-config-json and auto-config upgrade
Introduce a machine-readable config-upgrade mode (--upgrade-config-json) and wire automatic configuration upgrades into the binary upgrade flow. The upgrade command now attempts to run the newly installed binary to merge template changes into backup.env (adding missing keys while preserving existing values).
Implemented robust parsing and rendering for multi-line (block) env values, refactored value parsing into helpers (parseEnvValues, splitKeyValueRaw, renderEnvValue, findClosingQuoteLine) and updated computeConfigUpgrade to preserve block entries and multiple values per key. Added tests covering block preservation and missing-block detection.
printUpgradeFooter now reports detailed config-upgrade results or errors, and installer/help text was updated to reflect the behavior change. Error handling for the JSON mode and subprocess invocation was added to ensure clear diagnostics.
* Refine upgrade prompts, previews, and errors
Make the upgrade UX and diagnostics clearer: update the interactive prompt to inform users a backup will be created and backup.env may be updated; extract maxUpgradeConfigJSONPreviewLength constant and use it when truncating invalid JSON preview. Improve error messages to include the config path when parsing fails and the starting line number for unterminated multi-line values. Update tests to normalize CRLF vs LF so assertions are deterministic across platforms.
bootstrap.Printf("Latest available version: %s (current: %s)", latestVersion, currentVersion)
125
128
126
129
reader:=bufio.NewReader(os.Stdin)
127
-
confirm, err:=promptYesNo(ctx, reader, "Do you want to download and install this version now? [y/N]: ", false)
130
+
confirm, err:=promptYesNo(ctx, reader, "Do you want to download and install this version now? (backup.env will be updated with any missing keys; a backup will be created) [y/N]: ", false)
0 commit comments