diff --git a/scripts/package/src/package_managers/gem.sh b/scripts/package/src/package_managers/gem.sh index 8b08baf7..5b7fdf55 100644 --- a/scripts/package/src/package_managers/gem.sh +++ b/scripts/package/src/package_managers/gem.sh @@ -1,3 +1,10 @@ +gem::is_macos_default() { + current_ruby_path=$(command -v ruby) + default_ruby_path="/usr/bin/ruby" + + platform::is_macos && [[ $current_ruby_path == "$default_ruby_path" ]] +} + gem::update_all() { outdated=$(gem outdated) diff --git a/scripts/package/update_all b/scripts/package/update_all index 8ad7fa29..fd1b9c9f 100755 --- a/scripts/package/update_all +++ b/scripts/package/update_all @@ -24,7 +24,7 @@ platform::command_exists mas && output::h2 '🍎 App Store' && mas::update_all platform::command_exists brew && output::h2 '🍺 Brew' && brew::update_all platform::command_exists pip3 && output::h2 '🐍 pip' && pip::update_all platform::command_exists composer && output::h2 '🐘 Composer' && composer::update_all -platform::command_exists gem && output::h2 '♦️ gem' && gem::update_all +platform::command_exists gem && ! gem::is_macos_default && output::h2 '♦️ gem' && gem::update_all platform::command_exists npm && output::h2 '🌈 npm' && npm::update_all platform::command_exists cargo && output::h2 '📦 cargo' && cargo::update_all