mirror of
https://github.com/electron/node-gyp.git
synced 2025-08-15 04:48:20 +02:00
fix: Don't mutate promises for dependencies
This commit is contained in:
parent
3f80e318cd
commit
d11e95ab71
1 changed files with 5 additions and 2 deletions
|
@ -4,7 +4,7 @@ const promises = gracefulFs.promises
|
|||
/**
|
||||
* Add fs.rm for older versions of node
|
||||
*/
|
||||
promises.rm = promises.rm || async function (...args) {
|
||||
async function rm(...args) {
|
||||
const pathToRemove = args[0]
|
||||
const options = args[1] || {}
|
||||
|
||||
|
@ -28,5 +28,8 @@ promises.rm = promises.rm || async function (...args) {
|
|||
|
||||
module.exports = {
|
||||
...gracefulFs,
|
||||
promises
|
||||
promises: {
|
||||
rm,
|
||||
...promises,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue