From 517ba5c26afc2cab0cc1fa1c32a588fe73c025dd Mon Sep 17 00:00:00 2001 From: xhyrom Date: Tue, 4 Jan 2022 23:07:51 +0100 Subject: [PATCH] fix --- src/commands/newCommand.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/newCommand.ts b/src/commands/newCommand.ts index a9f9449..aaa161d 100644 --- a/src/commands/newCommand.ts +++ b/src/commands/newCommand.ts @@ -18,7 +18,7 @@ export default async() => { const jobs: [() => any, string][] = [ [() => cloneRepoJob(response), 'Cloning the repository'], [() => moveFolderJob(response), 'Moving the folder & Creating config'], - [() => installDependenciesJob(path.join(__dirname, '..', '..', response['project-name'])), 'Installing dependencies'] + [() => installDependenciesJob(`./${response['project-name']}`), 'Installing dependencies'] ] for (const [job, message] of jobs) { @@ -42,8 +42,8 @@ export const cloneRepoJob = (response) => { export const moveFolderJob = (response) => { return new Promise((resolve, reject) => { - const rawPath = `${path.join(__dirname, '..', '..', response['project-name'], `gcommands-templates-${response['project-template'].branch}`)}`; - const parsedPath = `${path.join(__dirname, '..', '..', response['project-name'])}` + const rawPath = `./${response['project-name']}/gcommands-templates-${response['project-template'].branch}`; + const parsedPath = `./${response['project-name']}`; mv(rawPath, parsedPath, { mkdirp: false, clobber: false }, (err) => { if (err) reject(err);