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>
This commit is contained in:
parent
f112c12b15
commit
a661907b40
2 changed files with 7 additions and 1 deletions
5
.changeset/tall-beans-own.md
Normal file
5
.changeset/tall-beans-own.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'create-astro': patch
|
||||
---
|
||||
|
||||
wrap projecDir in quptes if it contains spaces
|
|
@ -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 : ' '));
|
||||
|
|
Loading…
Reference in a new issue