From 2db7bf9559e0bb41177b8a85189596b6e94a05e8 Mon Sep 17 00:00:00 2001 From: Thadeu Cotts Date: Wed, 25 Nov 2020 11:47:32 -0300 Subject: [PATCH] [style] [s]: fix variable names style --- packages/create-portal-app/helpers/copy.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/create-portal-app/helpers/copy.js b/packages/create-portal-app/helpers/copy.js index aac081a7..6be74ed5 100644 --- a/packages/create-portal-app/helpers/copy.js +++ b/packages/create-portal-app/helpers/copy.js @@ -6,11 +6,11 @@ function _parserPath(path){ return [process.cwd(), destination].join(path.sep) } module.exports = function copy(root,destination){ - const dest_path = _parserPath(destination) + const destinationPath = _parserPath(destination) //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`); + if(fs.existsSync(destinationPath)){ + if(fs.readdirSync(destinationPath).length > 0) return Promise.reject(`directory ${destinationPath} exist and not empty`); } - return spawn.sync('cp', ['-r', root, dest_path]); + return spawn.sync('cp', ['-r', root, destinationPath]); }