aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config/model.rs18
-rw-r--r--src/main.rs3
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.