aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-22 23:25:40 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-22 23:25:40 +0300
commitd7ae163f8888cd9bf13e5a34e4d37f9518f76c01 (patch)
tree9b69a93cd171ad3ead2906a0ff55f1d945a5a9ba /src
parent705403fe31d8fd935bfebf92cdbdb511350ddbbf (diff)
fix: make windows installer checksum independent of get-filehash
refs #751
Diffstat (limited to 'src')
-rw-r--r--src/update.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/update.rs b/src/update.rs
index bedcc1b0..bceef7b0 100644
--- a/src/update.rs
+++ b/src/update.rs
@@ -638,6 +638,12 @@ fn install_windows_update_with_installer(channel: UpdateChannel) -> Result<(), S
"irm https://herdr.dev/install.ps1 | iex",
])
.env("HERDR_CHANNEL", channel.as_str())
+ // Drop any inherited PSModulePath. When herdr is launched from
+ // PowerShell 7, its Core module paths come first and Windows
+ // PowerShell 5.1 (this `powershell`) fails to autoload cmdlets like
+ // Get-FileHash. Removing it lets 5.1 compute its own default path.
+ // See PowerShell/PowerShell#8635.
+ .env_remove("PSModulePath")
.status()
.map_err(|err| format!("failed to run Windows installer: {err}"))?;