Skip to content

Commit

Permalink
Merge pull request #1308 from pocke/Run__bundle_install__automaticall…
Browse files Browse the repository at this point in the history
…y_in_bin_steep

Run `bundle install` automatically in bin/steep
  • Loading branch information
soutaro committed Apr 26, 2023
2 parents 7a3c3f1 + c5430b3 commit 488fec6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bin/steep
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ GEMFILE=$(readlink -f ${BINSTUB_DIR}/../steep/Gemfile)
ROOT_DIR=$(readlink -f ${BINSTUB_DIR}/..)

STEEP="bundle exec --gemfile=${GEMFILE} steep"
PREFIX=""

if type "rbenv" > /dev/null 2>&1; then
STEEP="rbenv exec ${STEEP}"
PREFIX="rbenv exec "
else
if type "rvm" > /dev/null 2>&1; then
STEEP="rvm ${ROOT_DIR} do ${STEEP}"
PREFIX="rvm ${ROOT_DIR} do "
fi
fi

exec $STEEP $@
${PREFIX}bundle install --gemfile=${GEMFILE} > /dev/null 2>&1
exec ${PREFIX}${STEEP} $@

0 comments on commit 488fec6

Please sign in to comment.