test: fix invalid variable name
authorSakthipriyan Vairamani <thechargingvolcano@gmail.com>
Thu, 1 Oct 2015 19:15:03 +0000 (00:45 +0530)
committerRod Vagg <rod@vagg.org>
Fri, 2 Oct 2015 03:39:26 +0000 (13:39 +1000)
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>
test/common.js

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