chore: replace Object.assign with object spread syntax (#34739)
This commit is contained in:
parent
ba4893c248
commit
e2c58d164d
8 changed files with 27 additions and 21 deletions
|
@ -235,12 +235,13 @@ async function installSpecModules (dir) {
|
|||
const CXXFLAGS = ['-std=c++17', process.env.CXXFLAGS].filter(x => !!x).join(' ');
|
||||
|
||||
const nodeDir = path.resolve(BASE, `out/${utils.getOutDir({ shouldLog: true })}/gen/node_headers`);
|
||||
const env = Object.assign({}, process.env, {
|
||||
const env = {
|
||||
...process.env,
|
||||
CXXFLAGS,
|
||||
npm_config_nodedir: nodeDir,
|
||||
npm_config_msvs_version: '2019',
|
||||
npm_config_yes: 'true'
|
||||
});
|
||||
};
|
||||
if (fs.existsSync(path.resolve(dir, 'node_modules'))) {
|
||||
await fs.remove(path.resolve(dir, 'node_modules'));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue