diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2015-03-18 22:11:14 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2015-03-19 02:10:36 +0100 |
commit | 2c6f79c08cba4e7adee9de2283c7d08cf977adcb (patch) | |
tree | f71de96866f7bfd0f7c3a27cdf557442bde922a1 /test/parallel/test-process-argv-0.js | |
parent | c15e81afdd5413f94df23eb82b6fc65875cb07fb (diff) | |
download | android-node-v8-2c6f79c08cba4e7adee9de2283c7d08cf977adcb.tar.gz android-node-v8-2c6f79c08cba4e7adee9de2283c7d08cf977adcb.tar.bz2 android-node-v8-2c6f79c08cba4e7adee9de2283c7d08cf977adcb.zip |
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>
Diffstat (limited to 'test/parallel/test-process-argv-0.js')
-rw-r--r-- | test/parallel/test-process-argv-0.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/test/parallel/test-process-argv-0.js b/test/parallel/test-process-argv-0.js index a5430509da..daf8cb60eb 100644 --- a/test/parallel/test-process-argv-0.js +++ b/test/parallel/test-process-argv-0.js @@ -22,12 +22,7 @@ if (process.argv[2] !== "child") { }); child.on('exit', function () { console.error('CHILD: %s', childErr.trim().split('\n').join('\nCHILD: ')); - if (process.platform === 'win32') { - // On Windows argv[0] is not expanded into full path - assert.equal(childArgv0, './iojs'); - } else { - assert.equal(childArgv0, process.execPath); - } + assert.equal(childArgv0, process.execPath); }); } else { |