Skip to content

Commit 5748ee1

Browse files
committed
set yarn version
1 parent 4d20948 commit 5748ee1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/integration/setup.js

+15
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const path = require('path');
6363
}
6464

6565
for (const DIR of REQUIRES_YARN_INSTALL) {
66+
setYarnVersion(DIR)
6667
console.log('>>> setup with yarn:', DIR)
6768
done = spawnSync(
6869
'yarn', ['install', '--immutable'], {
@@ -77,3 +78,17 @@ const path = require('path');
7778
}
7879
}
7980
})()
81+
82+
function setYarnVersion (DIR) {
83+
const done = spawnSync(
84+
'yarn', ['set', 'version', 'berry'], {
85+
cwd: path.resolve(__dirname, DIR),
86+
stdio: 'inherit',
87+
shell: true
88+
}
89+
)
90+
if (done.status !== 0) {
91+
++process.exitCode
92+
console.error(done)
93+
}
94+
}

0 commit comments

Comments
 (0)