Chocolatey (#34)
This commit is contained in:
@@ -137,6 +137,14 @@ fn run() -> Result<(), Error> {
|
||||
run_homebrew(&brew).report("Brew", &mut reports);
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
{
|
||||
if let Some(choco) = utils::which("choco") {
|
||||
terminal.print_separator("Chocolatey");
|
||||
run_chocolatey(&choco).report("Chocolatey", &mut reports);
|
||||
}
|
||||
}
|
||||
|
||||
git_repos.insert(home_path(".emacs.d"));
|
||||
|
||||
#[cfg(unix)]
|
||||
|
||||
11
src/steps.rs
11
src/steps.rs
@@ -141,6 +141,17 @@ pub fn upgrade_macos() -> Result<(), failure::Error> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
pub fn run_chocolatey(choco: &PathBuf) -> Result<(), failure::Error> {
|
||||
Command::new(&choco)
|
||||
.args(&["upgrade", "all"])
|
||||
.spawn()?
|
||||
.wait()?
|
||||
.check()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn run_homebrew(homebrew: &PathBuf) -> Result<(), failure::Error> {
|
||||
Command::new(&homebrew)
|
||||
.arg("update")
|
||||
|
||||
Reference in New Issue
Block a user