Browse Source

test: fix invalid variable name

The variable `er` is not declared at all. So if EPERM error is ever
raised then the `er` will throw `ReferenceError` and the code will
break.

PR-URL: https://github.com/nodejs/node/pull/3150
Reviewed-By: Brian White <mscdex@mscdex.net>
v5.x
Sakthipriyan Vairamani 9 years ago
parent
commit
6be2a59235
  1. 2
      test/common.js

2
test/common.js

@ -30,7 +30,7 @@ function rimrafSync(p) {
if (e.code === 'ENOENT') if (e.code === 'ENOENT')
return; return;
if (e.code === 'EPERM') if (e.code === 'EPERM')
return rmdirSync(p, er); return rmdirSync(p, e);
if (e.code !== 'EISDIR') if (e.code !== 'EISDIR')
throw e; throw e;
rmdirSync(p, e); rmdirSync(p, e);

Loading…
Cancel
Save