Skip to content

Commit b6bce03

Browse files
ingrosindresorhus
authored andcommitted
Close #559 PR: Fix wrong handling of NODE_PATH and relative test.
1 parent 69dbcf2 commit b6bce03

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/fork.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if (process.env.NODE_PATH) {
1818
})
1919
.join(path.delimiter);
2020

21-
env = objectAssign({NODE_PATH: nodePath}, env);
21+
env = objectAssign(env, {NODE_PATH: nodePath});
2222
}
2323

2424
module.exports = function (file, opts) {

test/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ test('watcher works', function (t) {
160160
});
161161

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

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

0 commit comments

Comments
 (0)