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: robust handling of env for npm-test-install · nodejs/node@3b94e31

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-npm-install.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-npm-install.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-npm-install.js
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ const pkgPath = path.join(common.tmpDir, 'package.json');
3232

3333
fs.writeFileSync(pkgPath, pkgContent);
3434

35+
const env = Object.create(process.env);
36+
env['PATH'] = path.dirname(process.execPath);
37+
3538
const proc = spawn(process.execPath, args, {
3639
cwd: common.tmpDir,
37-
env: {
38-
PATH: path.dirname(process.execPath)
39-
}
40+
env: env
4041
});
4142

4243
function handleExit(code, signalCode) {

0 commit comments

Comments
0 (0)
You are visitor 01402775 — 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.