gcr
gcr copied to clipboard
Windows command runner
Fixes #19 by using cmd.exe /C
instead of /bin/bash -c
when the platform is win32
Also ignore node_modules/ (my first git add went nuts with the whole node_modules folder)
I think I would prefer something more like:
var sh = '/bin/bash'
var flag = '-c'
if (process.platform === 'win32') {
sh = process.env.comspec || 'cmd'
flag = '/C'
}
var child = spawn(sh, [flag, fixedCmd.join(' ')], opts)
The thing I would want to confirm is that this does not break for users using git-bash vs the windows command prompt...
@evanlucas Good point, maybe if there sh
and flag
options on the command line? that way I can supply `gcr --shell cmd.exe --shell-flag "/C" to override the defaults and gcr then gain support for any environment instead of assuming that every one has /bin/bash
Yea, I'd be fine with that
I needed the tests working before I continue, will look at adding the options soon
Using this fork my runner now works fine
Hey @Arcath, I'm trying to get these PRs taken care of. Can you fix the conflicts and rebase off master? Also, you'll need to fix the command line shorthand options to not conflict with existing options, and be 1 character.
Any update on this, guys?