diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-10 16:09:17 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-10 16:09:17 +0300 |
| commit | 66be0b655fe922867f1eed100a41d67038b6ffd6 (patch) | |
| tree | dd17c7190cce1954bbb772622f875752be573ba5 /src | |
| parent | 4f7fcc48d1f760ab6057d0964f009c05b753456a (diff) | |
fix: stop windows installer from rewriting config
refs #1162
Diffstat (limited to 'src')
| -rw-r--r-- | src/config/model.rs | 18 | ||||
| -rw-r--r-- | src/main.rs | 3 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/config/model.rs b/src/config/model.rs index 8f94b4da..ee97c2c8 100644 --- a/src/config/model.rs +++ b/src/config/model.rs @@ -1116,6 +1116,24 @@ manifest_check = false assert!(!config.update.manifest_check); } + #[cfg(windows)] + #[test] + fn windows_update_config_defaults_to_preview() { + let empty: Config = toml::from_str("").unwrap(); + let without_update_channel: Config = + toml::from_str("[update]\nversion_check = false").unwrap(); + + assert_eq!( + Config::default().update.channel, + UpdateChannelConfig::Preview + ); + assert_eq!(empty.update.channel, UpdateChannelConfig::Preview); + assert_eq!( + without_update_channel.update.channel, + UpdateChannelConfig::Preview + ); + } + #[test] fn terminal_default_shell_defaults_empty_and_parses() { let default_config = Config::default(); diff --git a/src/main.rs b/src/main.rs index 575e23f8..a439ad34 100644 --- a/src/main.rs +++ b/src/main.rs @@ -145,7 +145,8 @@ const DEFAULT_CONFIG: &str = r##"# herdr configuration [update] # Update channel used by background version checks and `herdr update`. -# Use "stable" for normal releases or "preview" for opt-in preview builds. +# Defaults to "stable" on Linux/macOS and "preview" on Windows. +# Set explicitly to choose stable releases or opt-in preview builds. # channel = "stable" # Check herdr.dev for new Herdr versions in the background. |
