lib: don't error in repl when cwd doesn't exist
authorBen Noordhuis <info@bnoordhuis.nl>
Wed, 18 Mar 2015 21:31:16 +0000 (22:31 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Thu, 19 Mar 2015 01:11:38 +0000 (02:11 +0100)
commit2b2e48a4b91a4b636ae0e603968bd764697d1e57
tree66b667c086dd66d9d763891347ab737b2cd6207a
parent2c6f79c08cba4e7adee9de2283c7d08cf977adcb
lib: don't error in repl when cwd doesn't exist

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: 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>
lib/repl.js
test/parallel/test-cwd-enoent-repl.js [new file with mode: 0644]