You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Though I'm not sure what would happen to the cwd option and how it would affect things. I'm not very well versed in these matters. These changes do fix the issue for me in any case so I'll make a PR for this change.
The text was updated successfully, but these errors were encountered:
I'm using
node-cross-spawn
viaexeca
inside a worker thread.I seem to have found an issue related to #127 that only pops up if you set a custom cwd.
I've traced the error back to this line: https://github.com/moxystudio/node-cross-spawn/blob/master/lib/util/resolveCommand.js#L11
When we're running in a worker thread
process.chdir
is notundefined
. Instead, it's a named function.Therefore
shouldSwitchCwd
istrue
when running in a worker thread with custom cwd.I can see one reliable way of improving this check:
Though I'm not sure what would happen to the cwd option and how it would affect things. I'm not very well versed in these matters. These changes do fix the issue for me in any case so I'll make a PR for this change.
The text was updated successfully, but these errors were encountered: