Skip to content

Commit

Permalink
Close #559 PR: Fix wrong handling of NODE_PATH and relative test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ingro authored and sindresorhus committed Feb 16, 2016
1 parent 69dbcf2 commit b6bce03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/fork.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if (process.env.NODE_PATH) {
})
.join(path.delimiter);

env = objectAssign({NODE_PATH: nodePath}, env);
env = objectAssign(env, {NODE_PATH: nodePath});
}

module.exports = function (file, opts) {
Expand Down
2 changes: 1 addition & 1 deletion test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ test('watcher works', function (t) {
});

test('handles NODE_PATH', function (t) {
var nodePaths = 'node-paths/modules' + path.delimiter + 'node-paths/deep/nested';
var nodePaths = 'fixture/node-paths/modules' + path.delimiter + 'fixture/node-paths/deep/nested';

execCli('fixture/node-paths.js', {env: {NODE_PATH: nodePaths}}, function (err) {
t.ifError(err);
Expand Down

0 comments on commit b6bce03

Please sign in to comment.