Skip to content

Commit 04801a7

Browse files
committed
Clarify logic in the launchers ecosystem test
1 parent d453ac1 commit 04801a7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/truffle/ecosystem/launchers.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ done
1414

1515
source "$(dirname $SELF_PATH)/../common.sh.inc"
1616

17-
# Use homedir of the RUBY_BIN executable if provided
18-
cd "$(jt ruby -e 'puts Truffle::Boot.ruby_home')"
19-
2017
function check_launchers() {
2118
if [ -n "$2" ]
2219
then
@@ -41,6 +38,11 @@ function check_in_dir() {
4138
}
4239

4340

41+
# Use the Ruby home of the `jt ruby` launcher
42+
ruby_home="$(jt ruby -e 'puts Truffle::Boot.ruby_home')"
43+
cd "$ruby_home"
44+
45+
4446
echo '** Check all launchers work'
4547
check_launchers bin/ true
4648
check_in_dir bin
@@ -54,11 +56,9 @@ fi
5456

5557
echo '** Check gem executables are installed in all bin dirs'
5658

57-
home=$(pwd)
58-
5959
cd "$(dirname $SELF_PATH)/hello-world"
60-
"$home/bin/gem" build hello-world.gemspec
61-
"$home/bin/gem" install hello-world-0.0.1.gem
60+
"$ruby_home/bin/gem" build hello-world.gemspec
61+
"$ruby_home/bin/gem" install hello-world-0.0.1.gem
6262
cd -
6363

6464
version="$(bin/ruby -v)"

0 commit comments

Comments
 (0)