Add minor refactorings (#754)
This commit is contained in:
@@ -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(())
|
||||
@@ -84,7 +84,7 @@ pub fn pnpm_global_update(run_type: RunType) -> Result<()> {
|
||||
let pnpm = require("pnpm")?;
|
||||
|
||||
print_separator("Performant Node Package Manager");
|
||||
run_type.execute(&pnpm).args(&["update", "-g"]).check_run()
|
||||
run_type.execute(&pnpm).args(["update", "-g"]).check_run()
|
||||
}
|
||||
|
||||
pub fn deno_upgrade(ctx: &ExecutionContext) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user