-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
fs.mkdir, fs.mkdtemp(Sync) return ENOENT for the documentation example (Windows, run from git bash) #14960
Comments
Update, actually the path translation issue is not so clear, I only get the "C" drive absolute path from
By the way, if I create
|
You should probably use platform specific temp folder, something like: const tempFolder = process.platform === 'win32' ? process.env['TEMP'] : '/tmp';
fs.mkdtemp(path.join(tempFolder, 'foo-'), ...); |
@lll000111 do you still have issue with |
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>
The problem does not occur when
node
is started from a Windows shell - so it may be a git bash bug in the end?Originally reported as
flow-upgrade
issue: facebook/flow#4647 (comment)Code taken from https://nodejs.org/dist/latest-v8.x/docs/api/fs.html#fs_fs_mkdtemp_prefix_options_callback
When I run this from the node console started in the git for Windows bash I get
/tmp
exists and is accessible and writable, I can runmkdir /tmp/foo
_from the bash command line.The problem becomes visible in the full error message:
Highlight:
path: 'C:\\tmp\\FOO'
The text was updated successfully, but these errors were encountered: