From b1ec138d2d34dfb441492f7814c8ddbac7a3b454 Mon Sep 17 00:00:00 2001 From: Ryan Christian Date: Wed, 24 Nov 2021 14:50:01 -0600 Subject: [PATCH] chore: Moving over mkdir for file subject output --- packages/cli/tests/lib/output.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/tests/lib/output.js b/packages/cli/tests/lib/output.js index d4bc7d3d4..bd9c4d3ea 100644 --- a/packages/cli/tests/lib/output.js +++ b/packages/cli/tests/lib/output.js @@ -11,15 +11,15 @@ function tmpDir() { .toString(36) .replace(/[^a-z]+/g, '') .substr(0, 12); + if (!existsSync(output)) { + mkdirSync(output, { recursive: true }); + } return resolve(output, str); } async function subject(name) { let src = resolve(subjects, name); let dest = tmpDir(); - if (!existsSync(dest)) { - mkdirSync(dest, { recursive: true }); - } await promisify(copy)(src, dest); return dest; }