fix(powershell): don't use sudo with Update-Module for pwsh

Co-authored-by: Ao <197966644+ao-xing@users.noreply.github.com>
Co-authored-by: nistee <52573120+niStee@users.noreply.github.com>
This commit is contained in:
Andre Toerien
2025-06-22 15:14:55 +02:00
committed by Gideon
parent 6d14ac1693
commit 9fc5fe9798
2 changed files with 49 additions and 12 deletions

View File

@@ -465,7 +465,7 @@ impl Step {
Poetry => runner.execute(*self, "Poetry", || generic::run_poetry(ctx))?,
Powershell => {
let powershell = powershell::Powershell::new();
if powershell.profile().is_some() {
if powershell.is_available() {
runner.execute(Powershell, "Powershell Modules Update", || {
powershell.update_modules(ctx)
})?;