From 857c200e9cdfcf8345af489ae11cff39a8b704b6 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Thu, 23 Feb 2023 21:29:18 +0800 Subject: [PATCH] fix: wrap in quotes if the project name contains spaces (#218) --- index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.ts b/index.ts index bfd82c71..6f912e1f 100755 --- a/index.ts +++ b/index.ts @@ -446,7 +446,8 @@ async function init() { console.log(`\nDone. Now run:\n`) if (root !== cwd) { - console.log(` ${bold(green(`cd ${path.relative(cwd, root)}`))}`) + const cdProjectName = path.relative(cwd, root) + console.log(` ${bold(green(`cd ${cdProjectName.includes(' ') ? `"${cdProjectName}"` : cdProjectName}`))}`) } console.log(` ${bold(green(getCommand(packageManager, 'install')))}`) if (needsPrettier) { -- 2.39.5