Open pflannery opened 10 years ago
then something like this would go here
if (process.platform === 'win32') {
value = value.replace(/^([\\\/.:\w\-]+)/ig, "$&.cmd");
}
doing this get chainy install common
working on my windows instance.
Yeah, we should use bevry/safeps for this, it'll handle it automatically.
actually, exec plugin already uses safeps... so we need to find out why safeps wasn't fixing this for us... https://github.com/chainy-plugins/exec/blob/master/lib/exec.js#L4
perhaps it's because we are giving it one string instead of an array
this is where it should work: https://github.com/bevry/safeps/blob/master/src/lib/safeps.coffee#L117-L123
doh I didnt see your last two comments until now. It maybe because of the opts.safe not being true in the exec plugin?
I made a pr but it looks like it should handle it just not triggering ? https://github.com/bevry/safeps/pull/5
Because node on windows needs to specify the .cmd extension when were using spawn then commands like
chainy install common
fail with spawn NOENT during lines like thisif we parsed all chainy-plugin-exec command lines (windows only) with a regexp that extends the first word to include
.cmd
then maybe we can work around with minimal fuss.@balupton something similar to this?