diff --git a/home/.chezmoiscripts/universal/run_before_01-system-homebrew.sh.tmpl b/home/.chezmoiscripts/universal/run_before_01-system-homebrew.sh.tmpl index d7371200..b763994c 100644 --- a/home/.chezmoiscripts/universal/run_before_01-system-homebrew.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_before_01-system-homebrew.sh.tmpl @@ -171,9 +171,6 @@ if [ -d /Applications ] && [ -d System ]; then fi fi -### Ensure gem is updated -gem update --system - ### Scrub ~/.viminfo if [ -f "$HOME/.viminfo" ]; then logg info 'Removing ~/.viminfo' && sudo rm -f "$HOME/.vimino" diff --git a/home/.chezmoiscripts/universal/run_onchange_after_01-auto-update.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_01-auto-update.sh.tmpl index 7017bc28..1ff59f35 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_01-auto-update.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_01-auto-update.sh.tmpl @@ -18,3 +18,10 @@ if [ -d /Applications ] && [ -d /System ]; then sudo launchctl load "/Library/LaunchDaemons/com.apple.automatedupdates.plist" && logg success 'launchctl load successful' fi fi + +### Ensure gem is updated +if command -v gem > /dev/null; then + logg info 'Ensuring system gem is updated' && gem update --system +else + logg info 'Could not find gem in PATH so skipping gem system update' +fi