File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,8 @@ DecompilerMain=dotty.tools.dotc.decompiler.Main
201
201
ReplMain=dotty.tools.repl.Main
202
202
ScriptingMain=dotty.tools.scripting.Main
203
203
204
+ declare -a java_args
205
+ declare -a scala_args
204
206
declare -a residual_args
205
207
declare -a script_args
206
208
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ while [[ $# -gt 0 ]]; do
99
99
shift
100
100
;;
101
101
-d|-debug)
102
- DEBUG=" $DEBUG_STR "
102
+ DEBUG=" ${ DEBUG_STR-} "
103
103
shift ;;
104
104
-version)
105
105
# defer to scalac, then exit
@@ -155,13 +155,12 @@ while [[ $# -gt 0 ]]; do
155
155
done
156
156
157
157
# [ -n "${dump_args}" ] && dumpArgs ; exit 2
158
-
159
158
if [ -z " ${execute_mode-} " ]; then
160
159
# no script was specified, set run or repl mode
161
- if [[ $options_indicator -ne 0 || ${# residual_args[@]} -ne 0 ]]; then
162
- setExecuteMode ' run'
163
- else
160
+ if [[ $options_indicator -eq 0 && " ${residual_args[@]-} " == " " ]]; then
164
161
setExecuteMode ' repl'
162
+ else
163
+ setExecuteMode ' run'
165
164
fi
166
165
fi
167
166
224
223
repl_cparg+=" $PSEP$DOTTY_COMP$PSEP$TASTY_CORE$PSEP$DOTTY_INTF$PSEP$SCALA_ASM$PSEP$DOTTY_STAGING$PSEP$DOTTY_TASTY_INSPECTOR "
225
224
fi
226
225
# exec here would prevent onExit from being called, leaving terminal in unusable state
227
- eval " \" $JAVACMD \" " " $DEBUG " " -classpath \" $repl_cparg \" " " ${java_args[@]} " " ${residual_args[@]} "
226
+ eval " \" $JAVACMD \" " " ${ DEBUG-} " " -classpath \" $repl_cparg \" " " ${java_args[@]} " " ${residual_args[@]} "
228
227
scala_exit_status=$?
229
228
;;
230
229
You can’t perform that action at this time.
0 commit comments