From 78a491a97642af03b0c5a97933ee253170d36648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sch=C3=B6nauer?= <37108907+DottoDev@users.noreply.github.com> Date: Thu, 15 Dec 2022 20:27:27 +0000 Subject: [PATCH] Fixes rubygems on .deb distros (#268) Fixes rubygem on systems with the .deb ruby package --- src/steps/generic.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/steps/generic.rs b/src/steps/generic.rs index 375702a9..0af44507 100644 --- a/src/steps/generic.rs +++ b/src/steps/generic.rs @@ -89,7 +89,11 @@ pub fn run_rubygems(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> { print_separator("RubyGems"); - run_type.execute(gem).args(["update", "--system"]).status_checked() + if !std::path::Path::new("/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb").exists() { + run_type.execute(gem).args(["update", "--system"]).status_checked() + } else { + Ok(()) + } } pub fn run_haxelib_update(ctx: &ExecutionContext) -> Result<()> {