Skip to content

Commit 1e5488c

Browse files
authored
Merge pull request #3031 from tgodzik/fix-ci
bugfix: Fix testing native image on windows
2 parents 932c33f + a5cd9e3 commit 1e5488c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

bin/test-native-cli.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ fi
2525

2626
bin=$(cd "$(dirname "$1")" && pwd)/$(basename "$1")
2727

28+
# On Windows, scala-cli is installed as scala-cli.bat by coursier
29+
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OSTYPE" == "win32" ]]; then
30+
SCALA_CLI="scala-cli.bat"
31+
else
32+
SCALA_CLI="scala-cli"
33+
fi
34+
2835
"$bin" about
2936

3037
out=$("$bin" -Dbloop.smoke.marker=1 about 2>&1 || true)
@@ -45,7 +52,7 @@ class SmokeTest extends AnyFunSuite with BeforeAndAfterAllConfigMap {
4552
}
4653
EOF
4754

48-
(cd "$workspace" && scala-cli compile --test .)
55+
(cd "$workspace" && $SCALA_CLI compile --test .)
4956

5057
testProject=$(basename "$workspace"/.scala-build/.bloop/*-test.json .json)
5158
out=$(cd "$workspace/.scala-build" && "$bin" test "$testProject" -- -Dkey=value 2>&1 || true)

0 commit comments

Comments
 (0)