Skip to content

Commit 8a0d1cb

Browse files
putxetargos
authored andcommitted
test: change object assign to spread object
change object assign to spread object in test-npm-install.js PR-URL: #30422 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent c8df932 commit 8a0d1cb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/parallel/test-npm-install.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ const pkgPath = path.join(installDir, 'package.json');
3838

3939
fs.writeFileSync(pkgPath, pkgContent);
4040

41-
const env = Object.assign({}, process.env, {
42-
PATH: path.dirname(process.execPath),
43-
NPM_CONFIG_PREFIX: path.join(npmSandbox, 'npm-prefix'),
44-
NPM_CONFIG_TMP: path.join(npmSandbox, 'npm-tmp'),
45-
HOME: homeDir,
46-
});
41+
const env = { ...process.env,
42+
PATH: path.dirname(process.execPath),
43+
NPM_CONFIG_PREFIX: path.join(npmSandbox, 'npm-prefix'),
44+
NPM_CONFIG_TMP: path.join(npmSandbox, 'npm-tmp'),
45+
HOME: homeDir,
46+
};
4747

4848
exec(`${process.execPath} ${npmPath} install`, {
4949
cwd: installDir,

0 commit comments

Comments
 (0)