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
This mostly reverts #815, and #827. The Node regressions they fixed were resolved in Node 6.2.0. The new behavior is just to print a warning message so people know how to fix it.
// Workaround for breakage caused by https://github.com/nodejs/node/pull/5950
15
-
// Those changes will be reverted in https://github.com/nodejs/node/pull/6537
16
-
17
-
// Revert #815 and #827 when the above changes land in Node.js
18
-
console.warn('WARNING: `npm link ava` detected: This breaks NYC coverage on early versions of Node 6.\nSee https://github.com/avajs/ava/pull/815');
11
+
if(fs.realpathSync(__filename)!==__filename){
12
+
console.warn(
13
+
'WARNING: `npm link ava` and the `--preserve-symlink` flag are incompatible. '+
14
+
'We have detected that AVA is linked via `npm link`, and that your are using either using ether '+
15
+
'an early version of Node 6, or the `--preserve-symlink` flag. This breaks AVA. '+
16
+
'You should upgrade to Node 6.2.0+, avoid the `--preserve-symlink` flag, or avoid using `npm link ava`.'
17
+
);
19
18
}
20
19
21
20
varenv=process.env;
@@ -42,47 +41,11 @@ module.exports = function (file, opts) {
42
41
} : false
43
42
},opts);
44
43
45
-
varps;
46
-
47
-
if(fixNpmLink){
48
-
// Workaround for breakage caused by https://github.com/nodejs/node/pull/5950
49
-
// Those changes will be reverted in https://github.com/nodejs/node/pull/6537
50
-
51
-
// Revert #815 and #827 when the above changes land in Node.js
52
-
varexecArgv=process.execArgv;
53
-
varcwd=path.dirname(file);
54
-
55
-
// This whole if statement is copied straight out of Nodes `child_process`
56
-
if(process._eval!=null){// eslint-disable-line
57
-
varindex=execArgv.lastIndexOf(process._eval);
58
-
if(index>0){
59
-
// Remove the -e switch to avoid fork bombing ourselves.
0 commit comments