Skip to content

Commit 0ba5b55

Browse files
authored
Merge pull request #12411 from philwalk/fix-12405
Fix #12405 - workaround for fragile jline3 console detection in REPL
2 parents aa954de + 1e299aa commit 0ba5b55

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

dist/bin/common

+2-1
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,9 @@ SBT_INTF=$(find_lib "*compiler-interface*")
159159
JLINE_READER=$(find_lib "*jline-reader-3*")
160160
JLINE_TERMINAL=$(find_lib "*jline-terminal-3*")
161161
JLINE_TERMINAL_JNA=$(find_lib "*jline-terminal-jna-3*")
162-
[[ ${conemu-} ]] || JNA=$(find_lib "*jna-5*")
163162

163+
# jna-5 only appropriate for some combinations
164+
[[ ${conemu-} && ${msys-} ]] || JNA=$(find_lib "*jna-5*")
164165

165166
compilerJavaClasspathArgs () {
166167
# echo "dotty-compiler: $DOTTY_COMP"

dist/bin/scalac

+3-1
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ if [ "$PROG_NAME" == "$ScriptingMain" ]; then
6767
scripting_string="-script $target_script ${scripting_args[@]}"
6868
fi
6969

70-
# exec here would prevent onExit from being called, leaving terminal in unusable state
7170
[ -n "$script_trace" ] && set -x
71+
[ -z "${ConEmuPID-}" -o -n "${cygwin-}" ] && export MSYSTEM= PWD= # workaround for #12405
72+
73+
# exec here would prevent onExit from being called, leaving terminal in unusable state
7274
eval "\"$JAVACMD\"" \
7375
${JAVA_OPTS:-$default_java_opts} \
7476
"${java_args[@]}" \

0 commit comments

Comments
 (0)