c049cf2206
We keep a version of yarn in the repo, at `third_party/github.com/yarnpkg/`. All CI jobs should use that version for consistency (and easier updates). Previously, the Windows jobs did not use the local version. They used the version that came pre-installed on the docker image that we used. This made it more difficult to update the yarn version (something that we might want to do independently of updating other dependencies, such as Node.js). This commit fixes this by setting up the Windows CI jobs to also use the local, vendored version of yarn. PR Close #34384
16 lines
414 B
Plaintext
16 lines
414 B
Plaintext
$exe=""
|
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
# Fix case when both the Windows and Linux builds of Node
|
|
# are installed in the same directory
|
|
$exe=".exe"
|
|
}
|
|
$ret=0
|
|
if (Test-Path "$basedir/node$exe") {
|
|
& "$basedir/node$exe" "{{ LOCAL_YARN_PATH_PLACEHOLDER }}" $args
|
|
$ret=$LASTEXITCODE
|
|
} else {
|
|
& "node$exe" "{{ LOCAL_YARN_PATH_PLACEHOLDER }}" $args
|
|
$ret=$LASTEXITCODE
|
|
}
|
|
exit $ret
|