File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,11 @@ classpathArgs () {
187
187
toolchain+=" $JLINE_TERMINAL_JNA$PSEP "
188
188
toolchain+=" $JNA$PSEP "
189
189
190
- jvm_cp_args=" -classpath \" $toolchain \" "
190
+ if [ -n " $jvm_cp_args " ]; then
191
+ jvm_cp_args=" $toolchain$jvm_cp_args "
192
+ else
193
+ jvm_cp_args=" $toolchain$PSEP "
194
+ fi
191
195
}
192
196
193
197
default_java_opts=" -Xmx768m -Xms768m"
Original file line number Diff line number Diff line change @@ -151,9 +151,19 @@ if [ $execute_script == true ]; then
151
151
else
152
152
[[ $save_compiled == true ]] && rm -f $target_jar
153
153
set -- ${cp_arg-} ${java_options[@]} ${residual_args[@]} -script " $target_script " ${script_args[@]}
154
+ PROG_MAIN=$ScriptingMain
154
155
prepScalacCommandLine " $@ "
155
156
# exec here would prevent onExit from being called, leaving terminal in unusable state
156
- eval " \" $JAVACMD \" " " $DEBUG " " -classpath \" $cp_arg \" " " ${java_args[@]} " " ${residual_args[@]} "
157
+ eval " \" $JAVACMD \" " \
158
+ ${JAVA_OPTS:- $default_java_opts } \
159
+ " ${DEBUG-} " \
160
+ " ${java_args[@]} " \
161
+ " -classpath \" $jvm_cp_args \" " \
162
+ -Dscala.usejavacp=true \
163
+ " $PROG_NAME " \
164
+ " ${scala_args[@]} " \
165
+ " ${residual_args[@]} " \
166
+ " ${scripting_string-} "
157
167
scala_exit_status=$?
158
168
fi
159
169
elif [ $execute_repl == true ] || ([ $execute_run == false ] && [ $options_indicator == 0 ]); then
Original file line number Diff line number Diff line change 28
28
29
29
source " $PROG_HOME /bin/common"
30
30
31
- PROG_NAME=$CompilerMain
31
+ [ -z " $PROG_NAME " ] && PROG_NAME=$CompilerMain
32
32
33
33
prepScalacCommandLine " $@ "
34
34
35
35
# exec here would prevent onExit from being called, leaving terminal in unusable state
36
+ [ -n " $script_trace " ] && set -x
36
37
eval " \" $JAVACMD \" " \
37
38
${JAVA_OPTS:- $default_java_opts } \
38
39
" ${DEBUG-} " \
39
40
" ${java_args[@]} " \
40
- " $jvm_cp_args " \
41
+ -classpath " $jvm_cp_args " \
41
42
-Dscala.usejavacp=true \
42
43
" $PROG_NAME " \
43
44
" ${scala_args[@]} " \
You can’t perform that action at this time.
0 commit comments