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

doc: make mkdtemp example work on Windows #15408

Closed
wants to merge 2 commits into from

Conversation

Projects
None yet
8 participants
@bzoz
Copy link
Contributor

commented Sep 14, 2017

Fixes: #14960

Checklist
Affected core subsystem(s)

doc

@cjihrig
Copy link
Contributor

left a comment

LGTM with a comment.

@@ -1536,10 +1536,11 @@ object with an `encoding` property specifying the character encoding to use.
Example:

```js
fs.mkdtemp('/tmp/foo-', (err, folder) => {
const tempFolder = process.platform === 'win32' ? process.env['TEMP'] : '/tmp';

This comment has been minimized.

Copy link
@cjihrig

cjihrig Sep 14, 2017

Contributor

Why not use os.tmpDir() here?

This comment has been minimized.

Copy link
@bzoz

bzoz Sep 14, 2017

Author Contributor

You are right, updated.

if (err) throw err;
console.log(folder);
// Prints: /tmp/foo-itXde2
// Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2

This comment has been minimized.

Copy link
@lpinca

lpinca Sep 14, 2017

Member

I think this is also incorrect for macOS.

This comment has been minimized.

Copy link
@BridgeAR

BridgeAR Sep 19, 2017

Member

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)

This comment has been minimized.

Copy link
@lpinca

lpinca Sep 19, 2017

Member

Can confirm the tmp dir is different on macOS but ofc this comment should not block PR from landing.

@lpinca

lpinca approved these changes Sep 14, 2017

@BridgeAR

This comment has been minimized.

Copy link
Member

commented Sep 19, 2017

Landed in 1ebde6e

@BridgeAR BridgeAR closed this Sep 19, 2017

BridgeAR added a commit that referenced this pull request Sep 19, 2017

doc: make mkdtemp example work on Windows
PR-URL: #15408
Fixes: #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>

jasnell added a commit that referenced this pull request Sep 20, 2017

doc: make mkdtemp example work on Windows
PR-URL: #15408
Fixes: #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>

Qard pushed a commit to Qard/ayo that referenced this pull request Sep 21, 2017

doc: make mkdtemp example work on Windows
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>

Qard pushed a commit to Qard/ayo that referenced this pull request Sep 21, 2017

doc: make mkdtemp example work on Windows
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>

MylesBorins added a commit that referenced this pull request Oct 17, 2017

doc: make mkdtemp example work on Windows
PR-URL: #15408
Fixes: #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>
@MylesBorins

This comment has been minimized.

Copy link
Member

commented Oct 17, 2017

landed this on v6.x, please lmk if it is not relevant

@MylesBorins MylesBorins referenced this pull request Oct 17, 2017

Merged

v6.12.0 proposal #16263

MylesBorins added a commit that referenced this pull request Oct 25, 2017

doc: make mkdtemp example work on Windows
PR-URL: #15408
Fixes: #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>

@MylesBorins MylesBorins referenced this pull request Nov 3, 2017

Merged

v4.8.6 proposal #16500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.