Scala Programming Language
  1. Scala Programming Language
  2. SI-7687

scala.bat does not double quote %COMSPEC% path

    Details

      Description

      scala.bat does not double quote the %COMSPEC% path variable when setting the exit code (last line of the script):

      @@%COMSPEC% /C exit %errorlevel% >nul
      

      Instead of:

      @@"%COMSPEC%" /C exit %errorlevel% >nul
      

      This is usually ok because cmd.exe is in system32 by default (that path has no space in it), but it can be elsewhere in some configs and it creates a useless error message when the user is closing the REPL, like 'Unknown command "C:\Program"'

      Related scala-user discussion: https://groups.google.com/d/topic/scala-user/FBgClRSJ2qc/discussion

        Activity

        Show
        Antoine Gourlay added a comment - https://github.com/scala/scala/pull/2762
        Show
        Antoine Gourlay added a comment - Merged in https://github.com/scala/scala/commit/6717d6d91af4d2e24e5c3884ddf3204dc078285e

          People

          • Assignee:
            Antoine Gourlay
            Reporter:
            Antoine Gourlay
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development