From 3b73e11253d3a06d5291a77df648f21779797b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E9=A1=BA=E5=8D=97?= <137931579@qq.com> Date: Mon, 5 Feb 2018 10:41:52 +0800 Subject: [PATCH 1/2] fix the target name has symbol ":" in the Windows --- bin/vue-init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/vue-init b/bin/vue-init index 8a94fa7996..7f6208ff5a 100755 --- a/bin/vue-init +++ b/bin/vue-init @@ -65,7 +65,7 @@ const name = inPlace ? path.relative('../', process.cwd()) : rawName const to = path.resolve(rawName || '.') const clone = program.clone || false -const tmp = path.join(home, '.vue-templates', template.replace(/\//g, '-')) +const tmp = path.join(home, '.vue-templates', template.replace(/\/:/g, '-')) if (program.offline) { console.log(`> Use cached template at ${chalk.yellow(tildify(tmp))}`) template = tmp From 9d993ec57d12156aafcdb1c7c14fea1ee319348e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E9=A1=BA=E5=8D=97?= <137931579@qq.com> Date: Mon, 5 Feb 2018 10:42:57 +0800 Subject: [PATCH 2/2] fix the target name has symbol ":" in the Windows --- bin/vue-init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/vue-init b/bin/vue-init index 7f6208ff5a..41161a3e95 100755 --- a/bin/vue-init +++ b/bin/vue-init @@ -65,7 +65,7 @@ const name = inPlace ? path.relative('../', process.cwd()) : rawName const to = path.resolve(rawName || '.') const clone = program.clone || false -const tmp = path.join(home, '.vue-templates', template.replace(/\/:/g, '-')) +const tmp = path.join(home, '.vue-templates', template.replace(/[\/:]/g, '-')) if (program.offline) { console.log(`> Use cached template at ${chalk.yellow(tildify(tmp))}`) template = tmp