gcr icon indicating copy to clipboard operation
gcr copied to clipboard

Windows command runner

Open Arcath opened this issue 9 years ago • 7 comments

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)

Arcath avatar Oct 15 '15 14:10 Arcath

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 avatar Oct 15 '15 14:10 evanlucas

@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

Arcath avatar Oct 15 '15 15:10 Arcath

Yea, I'd be fine with that

evanlucas avatar Oct 15 '15 16:10 evanlucas

I needed the tests working before I continue, will look at adding the options soon

Arcath avatar Oct 19 '15 12:10 Arcath

Using this fork my runner now works fine

Arcath avatar Oct 19 '15 13:10 Arcath

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.

bushong1 avatar Aug 28 '16 03:08 bushong1

Any update on this, guys?

ReeganExE avatar Oct 11 '16 04:10 ReeganExE