Move vim upgrade to its module

This commit is contained in:
Roey Darwish Dror
2018-07-14 22:19:03 +03:00
parent 103c5a19c9
commit dccf508044
3 changed files with 28 additions and 26 deletions

View File

@@ -26,29 +26,6 @@ pub fn run_emacs(emacs: &PathBuf, init: &PathBuf) -> Result<(), failure::Error>
Ok(())
}
pub fn run_vim(vim: &PathBuf, vimrc: &PathBuf, upgrade_command: &str) -> Result<(), failure::Error> {
Command::new(&vim)
.args(&[
"-N",
"-u",
vimrc.to_str().unwrap(),
"-c",
upgrade_command,
"-c",
"quitall",
"-e",
"-s",
"-V1",
])
.spawn()?
.wait()?
.check()?;
println!();
Ok(())
}
pub fn run_apm(apm: &PathBuf) -> Result<(), failure::Error> {
Command::new(&apm)
.args(&["upgrade", "--confirm=false"])