From 9bbd98719faa6b080f1f4eea45b865c962b11aec Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Mon, 8 Nov 2021 10:34:50 +0100 Subject: [PATCH] also return the result of originalOpen --- lib/readfilecontext.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/readfilecontext.js b/lib/readfilecontext.js index 061ced2..bead642 100644 --- a/lib/readfilecontext.js +++ b/lib/readfilecontext.js @@ -17,7 +17,7 @@ exports.getReadFileContextPrototype = function() { let proto; fsBinding.open = (_path, _flags, _mode, req) => { proto = Object.getPrototypeOf(req.context); - originalOpen.apply(fsBinding, [_path, _flags, _mode, req]); + return originalOpen.apply(fsBinding, [_path, _flags, _mode, req]); }; fs.readFile('/ignored.txt', () => {});