-
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
Exception on startup if $PWD is deleted #1184
Comments
What iojs version and what platform are you on? |
Just downloaded it, so 1.5.1 and Mac OS X 10.10(.3) Yosemite. |
Don't think it is a bug. This happens when cwd is removed |
I think that just running |
@vkurchatkin Removed? |
steps to reproduce:
|
Isn't a bug, the folder was removed from another process and |
@matrixdevuk executing |
Ah, running it again fixed it. Thanks guys. |
I'm going to reopen this and take a look. Throwing an error seems like a bad user experience. |
Simpler test:
|
You could probably just check if the directory in question exists, if not just say something like "Are you sure exists?". |
The current working directory may not exist when iojs starts up. Don't treat that as an error because it's still possible to do many useful things, like evaluating a command line script or starting a REPL. This commit also fixes an age-old Windows bug where process.argv[0] was not properly expanded, that's why the parallel/test-process-argv-0 test gets an update as well. Fixes: nodejs#1184 PR-URL: nodejs#1194 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
The current working directory may not exist when the REPL starts up. Don't treat that as an error because it's still possible to do many useful things. This is like the previous commit but for the REPL. Fixes: nodejs#1184 PR-URL: nodejs#1194 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
Fixed in c15e81a...2b2e48a. |
I've just seen an exact same error with Node.js 4.1.2. |
Can you file a new issue with steps on how to reproduce it? Do the regression tests from c15e81a...2b2e48a work for you locally? |
The test/parallel/test-cwd-enoent.js test works fine for me. I'll look into preparing an isolated test case. |
@mzgol FYI today I experimented this same issue on node v4.2.2 and it was because I was running a script inside of an autogenerated directory which didn't exist anymore (or it was deleted and created again meanwhile, so it fails even if they exists under the same name, I guess it's maybe because of the i-node pointers). |
Strange had a similar problem restarted and problem is solved. |
I am getting this issue in the following scenario:
$ node -v |
I just had this issue when I deleted then git cloned a director, and ran the script. |
No idea what any of this means besides "no such file or directory"; hopefully you experienced Node/IO devs will know what this means.
The text was updated successfully, but these errors were encountered: