Powershell fixes

This commit is contained in:
Roey Darwish Dror
2020-08-23 09:10:09 +03:00
parent f4a1f26e39
commit 201910ed28

View File

@@ -57,14 +57,21 @@ impl Powershell {
print_separator("Powershell Modules Update");
let cmd = if ctx.config().yes() {
"Update-Module -AcceptLicense -Force"
} else {
"Update-Module"
};
let mut cmd = vec!["Update-Module"];
if ctx.config().yes() {
cmd.push("-AcceptLicense");
}
if ctx.config().verbose() {
cmd.push("-Verbose")
}
println!("Updating modules...");
ctx.run_type().execute(&powershell).args(&["-Command", cmd]).check_run()
ctx.run_type()
.execute(&powershell)
.args(&["-NoProfile", "-Command", &cmd.join(" ")])
.check_run()
}
#[cfg(windows)]