diff options
author | Lyle Kopnicky <lyle@kopnicky.com> | 2015-02-15 16:34:55 -0800 |
---|---|---|
committer | Lyle Kopnicky <lyle@kopnicky.com> | 2015-02-15 16:34:55 -0800 |
commit | 32c422a5188c6c2c4ff8d75d018e9bb0508c0776 (patch) | |
tree | 74066ffdb89fa25c9900cffab7adb2b633587bea /build.number | |
parent | da49d9a00ec373a0e7f2ffe946a897a65c9b0741 (diff) | |
download | scala-32c422a5188c6c2c4ff8d75d018e9bb0508c0776.tar.gz scala-32c422a5188c6c2c4ff8d75d018e9bb0508c0776.tar.bz2 scala-32c422a5188c6c2c4ff8d75d018e9bb0508c0776.zip |
SI-4959 - UNIX bin scripts now work for paths with spaces
The bin scripts fsc, scala, scalac, scaladoc, and scalap were not
working when spaces were in the true path of the file (after symbolic
links were resolved). This is now fixed.
The problem affected OS X, Linux, and mingw on Windows. It did not
affect cygwin, because the code was special-cased for cygwin to use
cygpath to convert to short filenames, which eliminates spaces.
It did not affect the Windows command prompt, because that uses a
separate batch file.
The problem was that there was a shell function, classpathArgs, used
to generate the arguments for the classpath. Shell functions can only
return status codes, and emit text which can be captured in a command
substitution. Thus, they can contain strings, but not distinguish
which spaces should be part of a word, and which ones should separate
words.
The solution was to switch to using a bash array, as java_args and
scala_args were already doing. In this way, each element of the array
can contain spaces, but the elements are kept distinct.
There was an additional problem with mingw. There was some code that
used 'cmd //c' to convert the path to Windows format (drive letters
with colons, backslashes and semicolons instead the UNIX-style slashes
with colon separators). It turns out that when there are spaces in the
path, 'cmd //c' adds quotes around the result to protect it. This was
superfluous and actually caused a problem with parsing the first and
last paths in the classpath, leading to trouble in finding jars.
Diffstat (limited to 'build.number')
0 files changed, 0 insertions, 0 deletions