Skip to content

Commit

Permalink
Don't early-capture the fs.lchownSync method
Browse files Browse the repository at this point in the history
This is breaking some tests where I clobber the fs method
to add tests or simulate failures.
  • Loading branch information
isaacs committed Sep 25, 2019
1 parent df2826a commit 190e311
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chownr.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const handleEISDirSync =
fs.chownSync(path, uid, gid)
}
}
: fs[LCHOWNSYNC]
: (path, uid, gid) => fs[LCHOWNSYNC](path, uid, gid)

// fs.readdir could only accept an options object as of node v6
const nodeVersion = process.version
Expand Down

0 comments on commit 190e311

Please # to comment.