File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 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
201201ReplMain=dotty.tools.repl.Main
202202ScriptingMain=dotty.tools.scripting.Main
203203
204+ declare -a java_args
205+ declare -a scala_args
204206declare -a residual_args
205207declare -a script_args
206208
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ while [[ $# -gt 0 ]]; do
9999 shift
100100 ;;
101101 -d|-debug)
102- DEBUG=" $DEBUG_STR "
102+ DEBUG=" ${ DEBUG_STR-} "
103103 shift ;;
104104 -version)
105105 # defer to scalac, then exit
@@ -155,13 +155,12 @@ while [[ $# -gt 0 ]]; do
155155done
156156
157157# [ -n "${dump_args}" ] && dumpArgs ; exit 2
158-
159158if [ -z " ${execute_mode-} " ]; then
160159 # 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
164161 setExecuteMode ' repl'
162+ else
163+ setExecuteMode ' run'
165164 fi
166165fi
167166
224223 repl_cparg+=" $PSEP$DOTTY_COMP$PSEP$TASTY_CORE$PSEP$DOTTY_INTF$PSEP$SCALA_ASM$PSEP$DOTTY_STAGING$PSEP$DOTTY_TASTY_INSPECTOR "
225224 fi
226225 # 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[@]} "
228227 scala_exit_status=$?
229228 ;;
230229
You can’t perform that action at this time.
0 commit comments