PaulR PaulR - 2 years ago 267
Bash Question

Start msys mingw32 shell with bash command as argument

I need to open msys with an argument such as...

make -f Makefile.blah makefileArg


... so that a mingw32 shell is opened and the command is executed. In the msys bat file, it says that any arguments that aren't options will be passed as bash commands, but this isn't the case. The window just opens and closes, without the command being executed.

What do I need to do to achieve this?

Answer Source
msys2_shell.cmd -mingw32 -c "make -f Makefile.blah debug=1"

The problem was the lack of a -c to run whatever follows in quotes as commands with arguments (and the quotes, which -c needs).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download