From eb66b9c3dfe3e32a95f51c81f483d00c4beb8ad7 Mon Sep 17 00:00:00 2001 From: XP Date: Mon, 5 Dec 2016 23:26:36 +0800 Subject: [PATCH] create cache folder in temp 'cwd ' folder (#2157) --- __tests__/commands/_helpers.js | 5 +++++ 1 file changed, 5 insertions(+) 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({