-
Notifications
You must be signed in to change notification settings - Fork 9
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
await tmp.dir()
returns a string now.
#29
Comments
Good catch, I have unpublished 2.x in the meantime since the regression is big enough in my opinion to warrant that on holiday but I've not reverted the code in master. I can take a look when I'm back from DevDays on doing a quick fix. I thought we had a test for this but apparently we don't - that's entirely unacceptable and is my fault, I will write one when I get back. PR for either (and hopefully both) of those things welcome :) |
I'll see if I can push a test! |
tmp-promise/index.js
Lines 25 to 30 in 6bd19f9
I think this is what is happening here is this:
promisify
will always pass its promise-resolving callback function after the caller's last argument. Callingtmp-promise
'stmp.dir
without anoptions
argument will causepromisify
to pass its callback function as the first arg (options
here), since the first arg is also the final arg.When
tmp.dir
is given a function as it's first arg, as is done here whenoptions
is not provided, it uses that argument as the callback function.This means the callback function
tmp-promise
provides as the second argument totmp.dir
is never called.The text was updated successfully, but these errors were encountered: