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")] {