exec-sh icon indicating copy to clipboard operation
exec-sh copied to clipboard

Ability to override shell.

Open ksmith97 opened this issue 5 years ago • 1 comments

When used on windows this library always returns cmd even if run in a /bin/sh compatible shell. Unfortunately, not all scripts can be run in both, for example the syntax ENVVAR=value app. I am in a situation where a library is using this library in its build where it uses such syntax and fails to execute. When I manually change this library to return sh it works properly. It would be convenient if there was a env variable or property I could set to force this into a compatible mode for use in windows where a sh compatible shell is available. While I can change the value of process.platform this may have larger consequences. If this sounds worthwhile I can submit a PR.

ksmith97 avatar May 18 '21 17:05 ksmith97

Hey @ksmith97,

Sorry for late response. I was not monitoring this repo for a while.

Overriding default shell with env variable like NPM_EXEC_SH_CMD should be ok.

tsertkov avatar Feb 12 '22 21:02 tsertkov