Here's the fix:
The problem is because of .bat files not being handled properly by
MinGW
Go to this directory - C:\Users[your username]\AppData\Local\.meteor
You should see a meteor.bat file there. Create a new file called "meteor" (without any extension and ""). Open it with notepad and paste the following:
#!/bin/sh
cmd //c "$0.bat" "$@"
save the file and now run git bash. You should be able to use meteor command in git bash.
Details
To run a *.bat
command from MinGW's MSYS shell, you must redirect the execution to cmd.exe
, thus:
cmd //c foo.bat [args ...]
The foo.bat
command file must be in a directory within $PATH
, (or you must specify the full path name ... using slashes, not backslashes unless you use two of them for each path name separator). Also, note the double slash to inform cmd.exe
that you are using its /C
option, (since it doesn't accept the -c
form preferred by the MSYS shell.
If you'd like to make the foo.bat
file directly executable from the MSYS shell, you may create a two line Bourne shell wrapper script called simply foo
alongside it, (in the same directory as foo.bat
), thus:
#!/bin/sh
cmd //c "$0.bat" "$@"
(so in your case, you'd create script file meteor
alongside meteor.bat
).
In fact, since this wrapper script is entirely generic, provided your file system supports hard file links, (as NTFS does for files on one single disk partition), you may create one wrapper script, and link it to as many command file names as you have *.bat
files you'd like to invoke in this manner; (hint: use the MSYS ln
command to link the files).
Credits to: Keith Marshall on SO and rakibul on Meteor Forums