Support rust 1.51.0 (#789)

This commit is contained in:
Roey Darwish Dror
2021-10-28 22:05:35 +03:00
committed by GitHub
parent 6ef5423d68
commit 539b267eef
23 changed files with 152 additions and 124 deletions

View File

@@ -23,7 +23,7 @@ impl Powershell {
let profile = path.as_ref().and_then(|path| {
Command::new(path)
.args(["-NoProfile", "-Command", "Split-Path $profile"])
.args(&["-NoProfile", "-Command", "Split-Path $profile"])
.check_output()
.map(|output| PathBuf::from(output.trim()))
.and_then(|p| p.require())
@@ -44,7 +44,7 @@ impl Powershell {
#[cfg(windows)]
pub fn has_module(powershell: &Path, command: &str) -> bool {
Command::new(&powershell)
.args([
.args(&[
"-NoProfile",
"-Command",
&format!("Get-Module -ListAvailable {}", command),
@@ -76,7 +76,7 @@ impl Powershell {
println!("Updating modules...");
ctx.run_type()
.execute(&powershell)
.args(["-NoProfile", "-Command", &cmd.join(" ")])
.args(&["-NoProfile", "-Command", &cmd.join(" ")])
.check_run()
}
@@ -103,7 +103,7 @@ impl Powershell {
};
command
.args([
.args(&[
"-NoProfile",
"-Command",
&format!(