Skip to content

Commit c94ea95

Browse files
committed
Fix macOS
1 parent bb41f76 commit c94ea95

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/prepare.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { fileURLToPath } from 'node:url';
66

77
const __dirname = dirname(fileURLToPath(import.meta.url));
88
const require = createRequire(import.meta.url);
9+
const env = {...process.env, NODE_OPTIONS: "--no-deprecation"};
910

1011
function prepareTest(root) {
1112
const pkgJson = require('../package.json');
@@ -27,10 +28,10 @@ function prepareTest(root) {
2728
rmSync(join(root, 'yarn.lock'), { force: true });
2829

2930
console.log('Clearing yarn cache...');
30-
spawnSync(`yarn cache clean ${pkgJson.name}`, { shell: true, stdio: 'inherit' });
31+
spawnSync(`yarn cache clean ${pkgJson.name}`, { shell: true, stdio: 'inherit', env });
3132
// Yarn has a bug where 'yarn cache clean X' does not remove the temp directory where the tgz is unpacked to.
3233
// This means installing from local tgz does not update when src changes are made https://github.com/yarnpkg/yarn/issues/5357
33-
const dirResult = spawnSync('yarn cache dir', { shell: true });
34+
const dirResult = spawnSync('yarn cache dir', { shell: true, env });
3435
const tmpDir = join(dirResult.output.toString().replace(/[,\n\r]/g, ''), '.tmp');
3536
rmSync(tmpDir, { recursive: true, force: true });
3637

0 commit comments

Comments
 (0)