diff --git a/__tests__/commands/_helpers.js b/__tests__/commands/_helpers.js index 6691d2eeab..8a4e4ba757 100644 --- a/__tests__/commands/_helpers.js +++ b/__tests__/commands/_helpers.js @@ -106,6 +106,11 @@ export async function run( await fs.mkdirp(path.join(cwd, '.yarn-cache')); await fs.mkdirp(path.join(cwd, 'node_modules')); + // make sure the cache folder been created in temp folder + if (flags.cacheFolder) { + flags.cacheFolder = path.join(cwd, flags.cacheFolder); + } + try { const config = new Config(reporter); await config.init({