Menu

#1963 MSYS needs to find "$COMSPEC" binary.

MSYS2
assigned
Alexx83
None
Bug
none
Unknown
False
2018-02-20
2013-04-26
Earnie Boyd
No

MSYS needs to support the following scripts.

$ cat /bin/cmd

1
2
3
4
5
6
7
8
#!/bin/sh
# Copyright (C) 2002, Earnie Boyd
#   mailto:earnie@users.sf.net
# This file is part of Minimal SYStem.
#   http://www.mingw.org/msys.shtml
# File: cmd

"$COMSPEC" "$@"

$ cat /bin/start

1
2
3
4
5
6
7
8
#!/bin/sh
# Copyright (C) 2002, Earnie Boyd
#   mailto:earnie@users.sf.net
# This file is part of Minimal SYStem.
#   http://www.mingw.org/msys.shtml
# File: start

cmd //c start "$@"

The current result of
$ start /msys.bat MSYS

cygwin warning:
  MS-DOS style path detected: /usr/local/bin/C:\Windows\system32\cmd.exe
  Preferred POSIX equivalent is: /usr/local/bin/C:/Windows/system32/cmd.exe
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
/usr/bin/cmd: line 2: C:\Windows\system32\cmd.exe: command not found
  • /usr/local/bin should not have been prefixed to C:\Windows\system32\cmd.exe.
  • MSYS2 needs to be able to operate on \ path delimiters.
  • See [#1962].
  • Paths to http://cygwin.com need to be modified to use http://mingw.org/wiki or removed.

Related

Issues: #1962

Discussion

  • Alexx83

    Alexx83 - 2013-05-14
    • status: unread --> assigned
     
  • Ville Koskela

    Ville Koskela - 2018-02-20

    I believe there may be a bug with /bin/start; the invocation of cmd /c should accept a single argument which is the entire command string.

    So the implementation:

    cmd //c start "$@"
    

    Should be:

    cmd //c "start $@"
    

    While start notepad works with both implementations, passing additional arguments to start such as /wait only works with the second implemetation. Specifically,

    $ start /wait notepad
    

    The current implementation returns a Windows dialog message stating that the file C:/MingGW/msys/1.0/wait cannot be found.

    The scripts are already available in MinGW so I'm not sure what this issue is tracking, but since it's open it seemed a good place to start. I can file a separate issue if you prefer or make a pull request if you could point me to the source.