From ab5b02c6c855c854da15a90593505334629865a2 Mon Sep 17 00:00:00 2001 From: Edvin Malinovskis Date: Sun, 13 Jan 2019 14:10:23 +0000 Subject: [PATCH] Add `--no-ruby` flag (#106) --- src/config.rs | 4 ++++ src/main.rs | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index a8da781a..391d1c38 100644 --- a/src/config.rs +++ b/src/config.rs @@ -76,6 +76,10 @@ pub struct Opt { #[structopt(long = "no-vim")] pub no_vim: bool, + /// Don't upgrade ruby gems + #[structopt(long = "no-gem")] + pub no_gem: bool, + /// Print what would be done #[structopt(short = "n", long = "dry-run")] pub dry_run: bool, diff --git a/src/main.rs b/src/main.rs index 01f0a263..4e938108 100644 --- a/src/main.rs +++ b/src/main.rs @@ -204,7 +204,10 @@ fn run() -> Result<(), Error> { target_os = "dragonfly" )))] report.push_result(execute(|| generic::run_apm(run_type), opt.no_retry)?); - report.push_result(execute(|| generic::run_gem(&base_dirs, run_type), opt.no_retry)?); + + if !opt.no_gem { + report.push_result(execute(|| generic::run_gem(&base_dirs, run_type), opt.no_retry)?); + } #[cfg(target_os = "linux")] {