From 174fee8c45c8937a02e31bf3a5cf1134d6671d48 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Mon, 20 Mar 2023 21:08:58 +0800 Subject: [PATCH] fix: update output projectDir --- packages/create-astro/src/messages.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/create-astro/src/messages.ts b/packages/create-astro/src/messages.ts index a0391b5e7d68..9121ad60f74c 100644 --- a/packages/create-astro/src/messages.ts +++ b/packages/create-astro/src/messages.ts @@ -121,12 +121,10 @@ export const nextSteps = async ({ projectDir, devCmd }: { projectDir: string; de await sleep(100); if (projectDir !== '') { - if (projectDir.includes(' ')) { - projectDir = `"${projectDir}"`; - } + projectDir = projectDir.includes(' ') ? `"./${projectDir}"` : `./${projectDir}`; const enter = [ `\n${prefix}Enter your project directory using`, - color.cyan(`cd ./${projectDir}`, ''), + color.cyan(`cd ${projectDir}`, ''), ]; const len = enter[0].length + stripAnsi(enter[1]).length; log(enter.join(len > max ? '\n' + prefix : ' '));