| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
LGTM with a comment.
Sorry, something went wrong.
|
|
||
| ```js | ||
| fs.mkdtemp('/tmp/foo-', (err, folder) => { | ||
| const tempFolder = process.platform === 'win32' ? process.env['TEMP'] : '/tmp'; |
There was a problem hiding this comment.
Why not use os.tmpDir() here?
Sorry, something went wrong.
There was a problem hiding this comment.
You are right, updated.
Sorry, something went wrong.
| if (err) throw err; | ||
| console.log(folder); | ||
| // Prints: /tmp/foo-itXde2 | ||
| // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2 |
There was a problem hiding this comment.
I think this is also incorrect for macOS.
Sorry, something went wrong.
There was a problem hiding this comment.
This should not be blocking though, right? As a comment it should be fine as is? (I do not have a Mac to test this on my own)
Sorry, something went wrong.
There was a problem hiding this comment.
Can confirm the tmp dir is different on macOS but ofc this comment should not block PR from landing.
Sorry, something went wrong.
PR-URL: nodejs/node#15408 Fixes: nodejs/node#14960 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#15408 Fixes: nodejs/node#14960 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
|
landed this on v6.x, please lmk if it is not relevant |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes: #14960
Checklist
Affected core subsystem(s)
doc