From ddfe63e19f9a31fa4892aec8dac8acd0bd8b824f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B8=E6=B4=A5?= <96865086+luo3house@users.noreply.github.com> Date: Wed, 30 Nov 2022 09:14:34 +0000 Subject: [PATCH 1/2] fix: stringify targetDir if present --- index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.ts b/index.ts index 02c9e49b..723ac74d 100755 --- a/index.ts +++ b/index.ts @@ -98,6 +98,9 @@ async function init() { ) === 'boolean' let targetDir = argv._[0] + if (targetDir !== undefined) { + targetDir = String(argv._[0]) + } const defaultProjectName = !targetDir ? 'vue-project' : targetDir const forceOverwrite = argv.force From cc9cc0fc5469a7f58e019c0422f6bd0ba40d5061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B8=E6=B4=A5?= <96865086+luo3house@users.noreply.github.com> Date: Wed, 30 Nov 2022 13:12:42 +0000 Subject: [PATCH 2/2] chore: tidy up --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 723ac74d..6aca05f8 100755 --- a/index.ts +++ b/index.ts @@ -99,7 +99,7 @@ async function init() { let targetDir = argv._[0] if (targetDir !== undefined) { - targetDir = String(argv._[0]) + targetDir = String(targetDir) } const defaultProjectName = !targetDir ? 'vue-project' : targetDir