Skip to content

Commit

Permalink
sources chruby before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
tisba committed May 11, 2024
1 parent 2f5e93e commit 57834bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utils/install-ruby
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ fi

brew install --quiet chruby ruby-install rust openssl@3

# shellcheck disable=SC1091
source "$(brew --prefix chruby)/share/chruby/chruby.sh"

# shellcheck source=/dev/null
if chruby | grep -q "$ruby_version"; then
read -r -n1 -p "🤔 Looks like Ruby ${ruby_version} is already installed. Reinstall? [Yy] "
Expand All @@ -31,8 +34,6 @@ ruby-install \
-- \
--disable-install-rdoc --with-openssl-dir="$(brew --prefix openssl@3)"

# shellcheck disable=SC1091
source "$(brew --prefix chruby)/share/chruby/chruby.sh"
chruby "$ruby_version"

gem update --system
Expand Down

0 comments on commit 57834bd

Please sign in to comment.