Invoke NPM only if the global installation dir is in the home directory (fix #21)

This commit is contained in:
Roey Darwish Dror
2018-06-09 20:39:13 +03:00
parent 59de02b8cf
commit 511d5f0559
3 changed files with 54 additions and 14 deletions

View File

@@ -73,16 +73,6 @@ pub fn run_vim(
Ok(())
}
pub fn run_npm(npm: &PathBuf) -> Result<(), failure::Error> {
Command::new(&npm)
.args(&["update", "-g"])
.spawn()?
.wait()?
.check()?;
Ok(())
}
pub fn run_apm(apm: &PathBuf) -> Result<(), failure::Error> {
Command::new(&apm)
.args(&["upgrade", "--confirm=false"])