From 190e311f56ebac9479e4d11eab4c9ff82154927a Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 24 Sep 2019 22:48:49 -0700 Subject: [PATCH] Don't early-capture the fs.lchownSync method This is breaking some tests where I clobber the fs method to add tests or simulate failures. --- chownr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chownr.js b/chownr.js index b056912..9f04393 100644 --- a/chownr.js +++ b/chownr.js @@ -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