Skip to content

Commit

Permalink
Fix malformed fs.promises.readFile
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Mar 25, 2023
1 parent 4dd7ded commit 66dacc4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/asar_monkey_patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ exports.wrapFsWithAsar = function(fs) {
})
}

const {readFilePromise} = fs.promises
const readFilePromise = fs.promises.readFile
fs.promises.readFile = function(p, options) {
const [isAsar, filePath] = splitPath(p)
if (!isAsar)
Expand Down
1 change: 0 additions & 1 deletion test/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ describe('node', function() {

it('fs.realpathSync works on dir in asar', async () => {
const result = await packageAndRun('fs_realpath_dir')
console.log(result.stderr.toString())
assert.equal(result.status, 0)
assert.ok(result.stdout.toString().endsWith(path.join('asar', 'dir')));
})
Expand Down

0 comments on commit 66dacc4

Please sign in to comment.