From 3537541060455d043fed25131e0c918fb516a99a Mon Sep 17 00:00:00 2001 From: liu fengyun Date: Wed, 29 Nov 2017 18:04:53 +0100 Subject: [PATCH 1/3] fix dotr for Cygwin and MingW --- dist/bin/dotr | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/bin/dotr b/dist/bin/dotr index 7b14f243e1b3..7e9c3bcd5120 100755 --- a/dist/bin/dotr +++ b/dist/bin/dotr @@ -58,16 +58,16 @@ done if [ $run_repl == true ] || [ ${#residual_args[@]} -eq 0 ]; then if [ "$CLASS_PATH" ]; then - cp_arg="-classpath $CLASS_PATH" + cp_arg="$CLASS_PATH" fi echo "Starting dotty REPL..." - eval "$PROG_HOME/bin/dotc $cp_arg -repl ${residual_args[@]}" + eval "$PROG_HOME/bin/dotc -classpath \"$cp_arg\" -repl ${residual_args[@]}" else - cp_arg="-classpath $DOTTY_LIB$PSEP$SCALA_LIB" + cp_arg="$DOTTY_LIB$PSEP$SCALA_LIB" if [ -z "$CLASS_PATH" ]; then cp_arg+="$PSEP." else cp_arg+="$PSEP$CLASS_PATH" fi - eval exec "\"$JAVACMD\"" "$DEBUG" "$cp_arg" "${residual_args[@]}" + eval exec "\"$JAVACMD\"" "$DEBUG" "-classpath \"$cp_arg\"" "${residual_args[@]}" fi From 4dfe6ae1f76c085b83e21e4bd46708544c37e8a1 Mon Sep 17 00:00:00 2001 From: liu fengyun Date: Wed, 29 Nov 2017 21:51:04 +0100 Subject: [PATCH 2/3] address review --- dist/bin/dotr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/bin/dotr b/dist/bin/dotr index 7e9c3bcd5120..fe7961fd1c7d 100755 --- a/dist/bin/dotr +++ b/dist/bin/dotr @@ -58,10 +58,10 @@ done if [ $run_repl == true ] || [ ${#residual_args[@]} -eq 0 ]; then if [ "$CLASS_PATH" ]; then - cp_arg="$CLASS_PATH" + cp_arg="-classpath \"$CLASS_PATH\"" fi echo "Starting dotty REPL..." - eval "$PROG_HOME/bin/dotc -classpath \"$cp_arg\" -repl ${residual_args[@]}" + eval "$PROG_HOME/bin/dotc $cp_arg -repl ${residual_args[@]}" else cp_arg="$DOTTY_LIB$PSEP$SCALA_LIB" if [ -z "$CLASS_PATH" ]; then From f1eb248462f2f438a281e4eaa493bfabb7fee956 Mon Sep 17 00:00:00 2001 From: liu fengyun Date: Wed, 29 Nov 2017 22:42:21 +0100 Subject: [PATCH 3/3] wrap bin/dotc in quotes for windows --- dist/bin/dotr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/bin/dotr b/dist/bin/dotr index fe7961fd1c7d..bb3d06330fdb 100755 --- a/dist/bin/dotr +++ b/dist/bin/dotr @@ -61,7 +61,7 @@ if [ $run_repl == true ] || [ ${#residual_args[@]} -eq 0 ]; then cp_arg="-classpath \"$CLASS_PATH\"" fi echo "Starting dotty REPL..." - eval "$PROG_HOME/bin/dotc $cp_arg -repl ${residual_args[@]}" + eval "\"$PROG_HOME/bin/dotc\" $cp_arg -repl ${residual_args[@]}" else cp_arg="$DOTTY_LIB$PSEP$SCALA_LIB" if [ -z "$CLASS_PATH" ]; then