Skip to content

Commit

Permalink
also chmod errPath in tmpdir
Browse files Browse the repository at this point in the history
  • Loading branch information
RaisinTen committed May 30, 2021
1 parent 96dd642 commit ee00cb0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/common/tmpdir.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,16 @@ function onexit() {

if (errCode === 'EACCES' || errCode === 'EPERM') {
const surroundingDir = path.join(errPath, '..');

try {
fs.chmodSync(surroundingDir, 0o777);
} catch {
}

try {
fs.chmodSync(errPath, 0o777);
} catch {
}
}
}

Expand Down

0 comments on commit ee00cb0

Please sign in to comment.