Skip to content

Commit

Permalink
fix(pnp): make sure pnp module is again the first preloaded module. (#…
Browse files Browse the repository at this point in the history
…6951)

* fix(pnp): make sure pnp module is again the first preloaded module.

* Update CHANGELOG.md
  • Loading branch information
jdalton authored and arcanis committed Jan 29, 2019
1 parent dc5945d commit c149410
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa

## Master

- Changes the location where the `--require ./.pnp.js` flag gets added into `NODE_OPTIONS`: now at the front (bis)

[#6951](https://github.com/yarnpkg/yarn/pull/6951) - [**John-David Dalton**](https://twitter.com/jdalton)

## 1.14.0

- Improves PnP compatibility with Node 6
Expand Down
2 changes: 1 addition & 1 deletion src/util/execute-lifecycle-script.js
Expand Up @@ -236,7 +236,7 @@ export async function makeEnv(
// Note that NODE_OPTIONS doesn't support any style of quoting its arguments at the moment
// For this reason, it won't work if the user has a space inside its $PATH
env.NODE_OPTIONS = env.NODE_OPTIONS || '';
env.NODE_OPTIONS += ` --require ${pnpFile}`;
env.NODE_OPTIONS = `--require ${pnpFile} ${env.NODE_OPTIONS}`;
}

pathParts.unshift(await getWrappersFolder(config));
Expand Down

0 comments on commit c149410

Please sign in to comment.