build: update npx.py to support npx@7 (#26662)

* build: update npx.py to support npx@7

* build: set npm_config_yes for all npx callsites
This commit is contained in:
Samuel Attard 2020-11-23 21:26:54 -08:00 committed by GitHub
parent e455a79218
commit b894151745
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 6 deletions

View file

@ -222,7 +222,8 @@ async function installSpecModules (dir) {
const nodeDir = path.resolve(BASE, `out/${utils.getOutDir({ shouldLog: true })}/gen/node_headers`);
const env = Object.assign({}, process.env, {
npm_config_nodedir: nodeDir,
npm_config_msvs_version: '2019'
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'));