Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Promise.finally() #64

Open
dogancelik opened this issue Aug 24, 2018 · 1 comment
Open

Support Promise.finally() #64

dogancelik opened this issue Aug 24, 2018 · 1 comment

Comments

@dogancelik
Copy link

TypeError: decompress(...).then(...).catch(...).finally is not a function
  at File._extractOnFinish (…\lib\file.js:243:18)
  at Object.onceWrapper (events.js:313:30)
  at emitNone (events.js:106:13)
  at EventEmitter.emit (events.js:208:7)
  at WriteStream.<anonymous> (…\lib\file.js:162:32)
  at emitNone (events.js:111:20)
  at WriteStream.emit (events.js:208:7)
  at finishMaybe (_stream_writable.js:614:14)
  at afterWrite (_stream_writable.js:465:3)
  at onwrite (_stream_writable.js:455:7)
  at fs.write (fs.js:2192:5)
  at FSReqWrap.wrapper [as oncomplete] (fs.js:685:5)

The module pify (github) allows option promiseModule, we should be able to pass a Promise function that supports finally().

@Richienb
Copy link

Richienb commented Aug 1, 2020

Workaround:

const decompress = require('decompress');

Promise.resolve(decompress(...)).then(...).catch(...).finally(...);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants