From: btea <2356281422@qq.com> Date: Thu, 23 Feb 2023 13:29:18 +0000 (+0800) Subject: fix: wrap in quotes if the project name contains spaces (#218) X-Git-Tag: v3.6.0~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=857c200e9cdfcf8345af489ae11cff39a8b704b6;p=thirdparty%2Fvuejs%2Fcreate-vue.git fix: wrap in quotes if the project name contains spaces (#218) --- 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) {