Honor quiet update mode in installers
ci / test (push) Canceled after 0s
ci / fuzz-smoke (push) Canceled after 0s
ci / windows-client (push) Canceled after 0s
ci / package-release (linux-x86_64, ubuntu-latest, , , ) (push) Canceled after 0s
ci / package-release (macos-aarch64, macos-14, , , ) (push) Canceled after 0s
ci / package-release (macos-x86_64, macos-13, , , ) (push) Canceled after 0s
ci / package-release (windows-aarch64, windows-latest, aarch64, windows, aarch64-pc-windows-msvc) (push) Canceled after 0s
ci / package-release (windows-x86_64, windows-latest, , , ) (push) Canceled after 0s
ci / remote-bench (push) Canceled after 0s
ci / publish-gitea-release (push) Canceled after 0s

This commit is contained in:
DuProcess
2026-07-16 20:16:55 -04:00
parent 25e361dea8
commit 6666965128
3 changed files with 53 additions and 21 deletions
+25
View File
@@ -6,6 +6,12 @@ fn quiet_update_keeps_prebuilt_enabled_by_default() {
!install.contains("use_prebuilt=0"),
"quiet updates must not force source builds"
);
assert!(install.contains("[ \"$quiet\" != \"1\" ] && echo \"Trying Dosh prebuilt"));
assert!(install.contains("[ \"$quiet\" != \"1\" ] && echo \"Building Dosh $role\""));
assert!(
!install.contains("[ \"$quiet\" = \"1\" ] && echo"),
"quiet updates must suppress informational installer output"
);
}
#[test]
@@ -159,6 +165,25 @@ fn windows_installer_bootstraps_rust_for_source_fallback_like_unix() {
assert!(!ps1.contains("Require-Command cargo"));
}
#[test]
fn windows_installer_honors_quiet_update_mode() {
let ps1 = include_str!("../install.ps1");
assert!(ps1.contains("$Quiet = $env:DOSH_UPDATE_QUIET"));
assert!(ps1.contains("function Write-Info($Message)"));
assert!(ps1.contains("if (-not $Quiet)"));
assert!(ps1.contains("Write-Info \"Trying Dosh prebuilt"));
assert!(ps1.contains("Write-Info \"Falling back to source build\""));
assert!(ps1.contains("Write-Info \"Installed Dosh client to $bindir\""));
assert!(
!ps1.contains("Write-Host \"Trying Dosh prebuilt"),
"Windows quiet update must not print prebuilt progress directly"
);
assert!(
!ps1.contains("Write-Host \"Installed Dosh client"),
"Windows quiet update must not print install summary directly"
);
}
#[test]
fn windows_installer_adds_user_path_idempotently() {
let ps1 = include_str!("../install.ps1");