src: don't error at startup when cwd doesn't exist
authorBen Noordhuis <info@bnoordhuis.nl>
Wed, 18 Mar 2015 21:11:14 +0000 (22:11 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Thu, 19 Mar 2015 01:10:36 +0000 (02:10 +0100)
commit2c6f79c08cba4e7adee9de2283c7d08cf977adcb
treef71de96866f7bfd0f7c3a27cdf557442bde922a1
parentc15e81afdd5413f94df23eb82b6fc65875cb07fb
src: don't error at startup when cwd doesn't exist

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: https://github.com/iojs/io.js/issues/1184
PR-URL: https://github.com/iojs/io.js/pull/1194
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
src/node.js
test/parallel/test-cwd-enoent.js [new file with mode: 0644]
test/parallel/test-process-argv-0.js