Closed mbutsko closed 8 years ago
Thanks for digging this up!
fixes #302
Hey @mbutsko were you able to replicate #302 before you sent this patch? I just tried lineman new test1234 --skip-examples --coffee
with and without the patch and both exited cleanly.
So yesterday, I encountered it without the coffee flag:
~ % lineman new bob --skip-examples
...
fs.js:77
throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
^
Error: ENOENT, unlink '/Users/butsko/bob/app/js/hello.coffee'
at Error (native)
Without the flag it shouldn't work without the patch, since it won't turn the .js into .coffee before trying to remove the .coffee.
Also, I think because it's asynchronously renaming files while at the same time trying to remove them, I can imagine it being intermittent with the flag (it managed to rename both files before attempting to remove them, which would result it no error...?)
Ah, and perhaps there's something here we can make synchronous.
Thanks for the explanation
Rather than try to delete them after they were possibly converted, just remove them earlier.