Skip to content

Commit dc4d818

Browse files
committed
Fix comments
1 parent 672c824 commit dc4d818

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dist/bin/dotr

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env bash
22

3+
IFS=""
34
# Try to autodetect real location of the script
45

56
if [ -z "$PROG_HOME" ] ; then
@@ -31,7 +32,6 @@ source "$PROG_HOME/bin/common"
3132

3233
CLASS_PATH=".$PSEP$DOTTY_LIB$PSEP$SCALA_LIB"
3334

34-
3535
addResidual () {
3636
residual_args+=("$1")
3737
}
@@ -66,14 +66,18 @@ case $key in
6666
esac
6767
done
6868

69-
CLASS_PATH="${classpath_args[@]}$CLASS_PATH"
70-
7169
if [ $run_repl == true ]; then
7270
echo "Starting dotty REPL"
73-
echo "$PROG_HOME/bin/dotc -classpath $CLASS_PATH -repl ${residual_args[@]}"
71+
if [ -z $classpath_args ]; then
72+
classpath_args=""
73+
else
74+
classpath_args="-classpath \"${classpath_args[*]}\""
75+
fi
76+
eval "$PROG_HOME/bin/dotc $classpath_args -repl ${residual_args[@]}"
7477
elif [ -z $residual_args ]; then
7578
echo "Starting dotty REPL..."
7679
eval "$PROG_HOME/bin/dotc -repl"
7780
else
81+
CLASS_PATH="${classpath_args[*]}$CLASS_PATH"
7882
eval exec "\"$JAVACMD\"" "$DEBUG" "-classpath \"$CLASS_PATH\"" "${residual_args[@]}"
7983
fi

0 commit comments

Comments
 (0)