summaryrefslogtreecommitdiff
path: root/packages/create-astro/src/messages.ts
diff options
context:
space:
mode:
authorGravatar btea <2356281422@qq.com> 2023-03-21 17:27:52 +0800
committerGravatar GitHub <noreply@github.com> 2023-03-21 06:27:52 -0300
commita661907b40e76aa56e7d7bd7e745bb16456b13e7 (patch)
tree1c7289e66c6a6045fb7d31b8acf0570b9aeae423 /packages/create-astro/src/messages.ts
parentf112c12b15dfbb278d66699f54809674dd1bded0 (diff)
downloadastro-a661907b40e76aa56e7d7bd7e745bb16456b13e7.tar.gz
astro-a661907b40e76aa56e7d7bd7e745bb16456b13e7.tar.zst
astro-a661907b40e76aa56e7d7bd7e745bb16456b13e7.zip
chore: wrap the projectDir in quotes if it contains spaces (#6594)
* chore: wrap the projectDir in quotes if it contains spaces * chore: add changeset * fix: update output projectDir * Update .changeset/tall-beans-own.md Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> --------- Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Diffstat (limited to 'packages/create-astro/src/messages.ts')
-rw-r--r--packages/create-astro/src/messages.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/create-astro/src/messages.ts b/packages/create-astro/src/messages.ts
index c0adbaa4a..9121ad60f 100644
--- a/packages/create-astro/src/messages.ts
+++ b/packages/create-astro/src/messages.ts
@@ -121,9 +121,10 @@ export const nextSteps = async ({ projectDir, devCmd }: { projectDir: string; de
await sleep(100);
if (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 : ' '));