From fa154d45de8273af730eff691203758842147a52 Mon Sep 17 00:00:00 2001 From: Thadeu Cotts Date: Tue, 24 Nov 2020 15:35:42 -0300 Subject: [PATCH] [todo] [s]: add refactor comment --- packages/create-portal-app/helpers/copy.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/create-portal-app/helpers/copy.js b/packages/create-portal-app/helpers/copy.js index d12cbfa1..6152c6c4 100644 --- a/packages/create-portal-app/helpers/copy.js +++ b/packages/create-portal-app/helpers/copy.js @@ -4,6 +4,7 @@ const spawn = require('cross-spawn'); module.exports = function copy(root,destination){ const dest_path = [process.cwd(), destination].join(path.sep) + //TODO Move this method to validate in another function to throw a error and prompt another name if(fs.existsSync(dest_path)){ if(fs.readdirSync(dest_path).length > 0) return Promise.reject(`directory ${dest_path} exist and not empty`); }