132: Refactor unix steps r=r-darwish a=r-darwish

bors r+

Co-authored-by: Roey Darwish Dror <roey.ghost@gmail.com>
This commit is contained in:
bors[bot]
2019-02-27 08:32:53 +00:00
2 changed files with 63 additions and 100 deletions

View File

@@ -186,17 +186,19 @@ fn run() -> Result<(), Error> {
execute(&mut report, "Scoop", || windows::run_scoop(run_type), config.no_retry())?;
#[cfg(unix)]
report.push_result(execute_legacy(
execute(
&mut report,
"brew",
|| unix::run_homebrew(config.cleanup(), run_type),
config.no_retry(),
)?);
)?;
#[cfg(target_os = "freebsd")]
report.push_result(execute_legacy(
|| freebsd::upgrade_packages(&sudo, run_type),
config.no_retry(),
)?);
#[cfg(unix)]
report.push_result(execute_legacy(|| unix::run_nix(run_type), config.no_retry())?);
execute(&mut report, "nix", || unix::run_nix(run_type), config.no_retry())?;
if config.should_run(Step::Emacs) {
#[cfg(unix)]
@@ -246,14 +248,18 @@ fn run() -> Result<(), Error> {
#[cfg(unix)]
{
report.push_result(execute_legacy(
execute(
&mut report,
"zplug",
|| unix::run_zplug(&base_dirs, run_type),
config.no_retry(),
)?);
report.push_result(execute_legacy(
)?;
execute(
&mut report,
"fisher",
|| unix::run_fisher(&base_dirs, run_type),
config.no_retry(),
)?);
)?;
report.push_result(execute_legacy(
|| tmux::run_tpm(&base_dirs, run_type),
config.no_retry(),