Skip to content

Commit

Permalink
Merge pull request #558 from soutaro/binstub
Browse files Browse the repository at this point in the history
Test if `.ruby-version` exists before `rvm do`
  • Loading branch information
soutaro authored May 24, 2022
2 parents 79bc7ca + 03650a6 commit b7955de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/steep/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ def process_binstub
STEEP="rbenv exec ${STEEP}"
else
if type "rvm" > /dev/null 2>&1; then
STEEP="rvm ${ROOT_DIR} do ${STEEP}"
if [ -e ${ROOT_DIR}/.ruby-version ]; then
STEEP="rvm ${ROOT_DIR} do ${STEEP}"
fi
fi
fi
Expand Down
4 changes: 3 additions & 1 deletion test/cli_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,9 @@ def test_binstub_generate
STEEP="rbenv exec ${STEEP}"
else
if type "rvm" > /dev/null 2>&1; then
STEEP="rvm ${ROOT_DIR} do ${STEEP}"
if [ -e ${ROOT_DIR}/.ruby-version ]; then
STEEP="rvm ${ROOT_DIR} do ${STEEP}"
fi
fi
fi
Expand Down

0 comments on commit b7955de

Please sign in to comment.