-
Notifications
You must be signed in to change notification settings - Fork 2k
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
mkdir -p
doesn't work as expected on windows
#2027
Comments
Ha -- with the release of Node 0.6, the Windows support struggle begins... There are probably a number of places where we shell out in the compiler's helper scripts that we should be proofreading for this kind of thing. |
Yeah, I vote for changing this to a general "support windows" ticket. |
I've been trying to do some heavy testing on windows since I want to use it in a client environment - this is the first oddity I've hit, but I'll feedback any other spots as I find them. Awesome package - props to everyone working on it. |
I am still getting this problem on windows. I am using coffee-script 1.3.3. |
Still occurs in 1.4.0 |
I also get this on 1.4.0. Are there any news on this? Why don't just use a plain JS solution, for example wrench has this. |
1.6.1 also has this issue. |
@Philipp15b right pure Javascript would work more reliably than platform-dependant system calls. See https://github.com/ryanmcgrath/wrench-js/blob/master/lib/wrench.js#L356 or https://github.com/substack/node-mkdirp/blob/master/index.js |
This is constantly causing the directory |
or with a real mkdir utility |
+1 to fix this |
I am wondering, why that PR #2091 has been rejected. It works correctly at least on Windows 7. I removed -p argument locally and have no issues with directory creation whatsoever even deep ones. Anyway there is no reason for the holdup as older Windows cannot create deep directories even with I tried another approach (#3101) using node-mkdirp as @damianb noted above. |
Since #3101 is merged, this can finally be closed now. Thanks @FredyC and @jashkenas! |
Awesome. I take it we can expect this in coffeescript 1.6.4? |
@damianb if you can't wait
|
The
mkdir -p
call in thewriteJs()
method inlib/coffee-script/command.js
does not work as expected on Windows when using thecoffee
compiler on a source tree with sub-directories - it will actually create a new directory-p
in the current working directory of the console environment instead.Here is the code from the current master branch causing the problem:
The recursive path creation behavior desired is natively available in Windows with
mkdir
ifCommand Extensions
are enabled (which they are by default). Here is the MS documentation formkdir
on WinXP (seems to apply for Win7+ as well).Perhaps this could check the
process.platform
flag (nodejs docs) for the Windows platform and omit the-p
flag?The text was updated successfully, but these errors were encountered: