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

@@ -27,7 +27,7 @@ impl NPM {
#[cfg(target_os = "linux")]
fn root(&self) -> Result<PathBuf> {
Command::new(&self.command)
.args(["root", "-g"])
.args(&["root", "-g"])
.check_output()
.map(|s| PathBuf::from(s.trim()))
}
@@ -37,10 +37,10 @@ impl NPM {
run_type
.execute("sudo")
.arg(&self.command)
.args(["update", "-g"])
.args(&["update", "-g"])
.check_run()?;
} else {
run_type.execute(&self.command).args(["update", "-g"]).check_run()?;
run_type.execute(&self.command).args(&["update", "-g"]).check_run()?;
}
Ok(())
@@ -98,14 +98,14 @@ pub fn pnpm_global_update(ctx: &ExecutionContext) -> Result<()> {
ctx.run_type()
.execute("sudo")
.arg(pnpm)
.args(["update", "-g"])
.args(&["update", "-g"])
.check_run()
} else {
ctx.run_type().execute(&pnpm).args(["update", "-g"]).check_run()
ctx.run_type().execute(&pnpm).args(&["update", "-g"]).check_run()
}
#[cfg(not(target_os = "linux"))]
ctx.run_type().execute(&pnpm).args(["update", "-g"]).check_run()
ctx.run_type().execute(&pnpm).args(&["update", "-g"]).check_run()
}
pub fn deno_upgrade(ctx: &ExecutionContext) -> Result<()> {