Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xhyrom committed Jan 4, 2022
1 parent c589994 commit 517ba5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/newCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit 517ba5c

Please sign in to comment.