Skip to content

Conversation

@jlenoble
Copy link
Contributor

@jlenoble jlenoble commented Aug 20, 2019

The upgrade to version 7.0.0 makes now use of execa option localDir. The latter package does now the actual call to npmRunPath.

But in order for the change to be seemless in gulp-mocha, the option preferLocal when calling execa must be set to true, otherwise the arrow function getEnv in execa will ignore it.

Moreover subprocess.stdout.pipe(subprocess.stdout); looked suspicious to me. I checked against gulp-mocha@6 and it used to be piped into process stdios. So I replaced piping subprocess stdios into themselves by their piping into process stdios.

npm run test didn't show any error after the changes, the 4 tests still pass.

Fixes #196

Fixes Command failed with exit code 2 (ENOENT) when mocha is not installed globally.
They were piped into themselves.
@sindresorhus sindresorhus changed the title Setting of preferLocal option to true & fixing stdio piping Fix regressions in v7 Aug 20, 2019
@sindresorhus sindresorhus merged commit f60a346 into sindresorhus:master Aug 20, 2019
@sindresorhus
Copy link
Owner

Thanks for fixing this 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Version 7.0.0 fails for basic tests

2 participants