From e46ddbf65af77acc8756257aa7e7a631792cf11d Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 14 Sep 2022 10:58:01 +0100 Subject: [PATCH] Fixes from PR comments. --- packages/cli/src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/utils.js b/packages/cli/src/utils.js index 81520708d8..91f3263cc1 100644 --- a/packages/cli/src/utils.js +++ b/packages/cli/src/utils.js @@ -73,7 +73,7 @@ exports.moveDirectory = (oldPath, newPath) => { const files = fs.readdirSync(oldPath) // check any file exists already for (let file of files) { - if (fs.existsSync(file)) { + if (fs.existsSync(join(newPath, file))) { throw new Error( "Unable to remove top level directory - some skeleton files already exist." )