gr icon indicating copy to clipboard operation
gr copied to clipboard

run command on Cygwin throws "ENOENT error executing the command"

Open garyhodgson opened this issue 7 years ago • 3 comments

I was getting the ENOENT error when trying to run commands (e.g. gr @tag -- mvn install) but fixed it by replacing the "child_process" module in lib/run.js with the "cross-spawn" (https://www.npmjs.com/package/cross-spawn)

(Env is Cygwin on Win 10, node v8.7.0)

garyhodgson avatar Oct 26 '17 20:10 garyhodgson

@garyhodgson Would it be possible to issue a pull request with your fix ? I am facing the same problem and would like to use your fix. Thanks !

sansp00 avatar Jun 19 '19 15:06 sansp00

I had hacked the node js directory directly. Add cross-spawn to the dependencies in package.json "cross-spawn": "^5.1.0",

replace line 1 of https://github.com/mixu/gr/blob/master/lib/run.js#L1 with var spawn = require('cross-spawn'),

garyhodgson avatar Jun 19 '19 16:06 garyhodgson

Thanks a million, I applied the fix and made gr work properly on my box :)

sansp00 avatar Jun 22 '19 01:06 sansp00