@@ -58,12 +58,17 @@ if uname | grep -q ^CYGWIN; then
58
58
cygwin=" $( uname) "
59
59
fi
60
60
61
+ unset mingw
62
+ if uname | grep -q ^MINGW; then
63
+ mingw=" $( uname) "
64
+ fi
65
+
61
66
# Finding the root folder for this Scala distribution
62
67
SCALA_HOME=" $( findScalaHome) "
63
68
SEP=" :"
64
69
65
70
# Possible additional command line options
66
- CYGWIN_OPT =" "
71
+ WINDOWS_OPT =" "
67
72
EMACS_OPT=" "
68
73
[[ -n " $EMACS " ]] && EMACS_OPT=" -Denv.emacs=$EMACS "
69
74
@@ -94,10 +99,16 @@ if [[ -n "$cygwin" ]]; then
94
99
fi
95
100
SCALA_HOME=" $( cygpath --$format " $SCALA_HOME " ) "
96
101
TOOL_CLASSPATH=" $( cygpath --path --$format " $TOOL_CLASSPATH " ) "
102
+ elif [[ -n " $mingw " ]]; then
103
+ SCALA_HOME=" $( cmd //c echo " $SCALA_HOME " ) "
104
+ TOOL_CLASSPATH=" $( cmd //c echo " $TOOL_CLASSPATH " ) "
105
+ fi
106
+
107
+ if [[ -n " $cygwin$mingw " ]]; then
97
108
case " $TERM " in
98
109
rxvt* | xterm* )
99
110
stty -icanon min 1 -echo
100
- CYGWIN_OPT =" -Djline.terminal=scala.tools.jline.UnixTerminal"
111
+ WINDOWS_OPT =" -Djline.terminal=scala.tools.jline.UnixTerminal"
101
112
;;
102
113
esac
103
114
fi
110
121
declare -a java_args
111
122
declare -a scala_args
112
123
113
- # default to the boot classpath for speed, except on cygwin/mingw.
124
+ # default to the boot classpath for speed, except on cygwin/mingw because
125
+ # JLine on Windows requires a custom DLL to be loaded.
114
126
unset usebootcp
115
- if [[ -z $cygwin ]]; then
127
+ if [[ -z " $cygwin$mingw " ]]; then
116
128
usebootcp=" true"
117
129
fi
118
130
@@ -181,7 +193,7 @@ execCommand \
181
193
-Dscala.home=" $SCALA_HOME " \
182
194
-Dscala.usejavacp=true \
183
195
$EMACS_OPT \
184
- $CYGWIN_OPT \
196
+ $WINDOWS_OPT \
185
197
@properties@ @class@ @toolflags@ " $@ @"
186
198
187
199
# record the exit status lest it be overwritten:
0 commit comments