GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: verify the shell option works properly on execFile · nodejs/node@e55e08c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test
    • parallel
      • test-child-process-execfile.js
    • sequential
      • test-child-process-execsync.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-child-process-execfile.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-execfile.js
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const uv = process.binding('uv');
66
const fixtures = require('../common/fixtures');
77

88
const fixture = fixtures.path('exit.js');
9+
const execOpts = { encoding: 'utf8', shell: true };
910

1011
{
1112
execFile(
@@ -38,3 +39,10 @@ const fixture = fixtures.path('exit.js');
3839
child.kill();
3940
child.emit('close', code, null);
4041
}
42+
43+
{
44+
// Verify the shell option works properly
45+
execFile(process.execPath, [fixture, 0], execOpts, common.mustCall((err) => {
46+
assert.ifError(err);
47+
}));
48+
}
Collapse file

‎test/sequential/test-child-process-execsync.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-child-process-execsync.js
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const TIMER = 200;
2929
const SLEEP = 2000;
3030

3131
const start = Date.now();
32+
const execOpts = { encoding: 'utf8', shell: true };
3233
let err;
3334
let caught = false;
3435

@@ -124,3 +125,8 @@ assert.strictEqual(ret, `${msg}\n`);
124125
return true;
125126
});
126127
}
128+
129+
// Verify the shell option works properly
130+
assert.doesNotThrow(() => {
131+
execFileSync(process.execPath, [], execOpts);
132+
});

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.