build: unify YARN_VERSION variable usage and ensure CI uses yarn not npm (#18607)
* build: unify YARN_VERSION variable usage and ensure CI uses yarn not npm * chore: use a JS helper so that it can work on windows * chore: make script/yarn without node_modules installed
This commit is contained in:
parent
0fc172fcaf
commit
a45afddb75
6 changed files with 35 additions and 18 deletions
|
@ -22,6 +22,7 @@ for (const flag of unknownFlags) {
|
|||
}
|
||||
|
||||
const utils = require('./lib/utils')
|
||||
const { YARN_VERSION } = require('./yarn')
|
||||
|
||||
const BASE = path.resolve(__dirname, '../..')
|
||||
const NPM_CMD = process.platform === 'win32' ? 'npm.cmd' : 'npm'
|
||||
|
@ -144,7 +145,7 @@ async function installSpecModules () {
|
|||
npm_config_nodedir: nodeDir,
|
||||
npm_config_msvs_version: '2017'
|
||||
})
|
||||
const { status } = childProcess.spawnSync(NPX_CMD, [`yarn@${utils.YARN_VERSION}`, 'install', '--frozen-lockfile'], {
|
||||
const { status } = childProcess.spawnSync(NPX_CMD, [`yarn@${YARN_VERSION}`, 'install', '--frozen-lockfile'], {
|
||||
env,
|
||||
cwd: path.resolve(__dirname, '../spec'),
|
||||
stdio: 'inherit'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue