mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 15:35:41 +00:00

For variables such as LD_LIBRARY_PATH and DYLD_LIBRARY_PATH that are needed for dynamically linked binaries PR-URL: https://github.com/nodejs/node/pull/16405 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
21 lines
609 B
JavaScript
21 lines
609 B
JavaScript
'use strict';
|
|
// This test verifies that the shell option is not supported by fork().
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const cp = require('child_process');
|
|
const expected = common.isWindows ? '%foo%' : '$foo';
|
|
|
|
if (process.argv[2] === undefined) {
|
|
const child = cp.fork(__filename, [expected], {
|
|
shell: true,
|
|
env: Object.assign({}, process.env, { foo: 'bar' })
|
|
});
|
|
|
|
child.on('exit', common.mustCall((code, signal) => {
|
|
assert.strictEqual(code, 0);
|
|
assert.strictEqual(signal, null);
|
|
}));
|
|
} else {
|
|
assert.strictEqual(process.argv[2], expected);
|
|
}
|