Skip to content

Commit 22d9be3

Browse files
Guillaume Chauyyx990803
Guillaume Chau
authored andcommitted
Fix absolute path handling on Windows (#272)
1 parent 30c11a1 commit 22d9be3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: bin/vue-init

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ if (exists(to)) {
9191

9292
function run () {
9393
// check if template is local
94-
if (/^[./]/.test(template)) {
95-
var templatePath = template.charAt(0) === '/'
94+
if (/^[./]|(\w:)/.test(template)) {
95+
var templatePath = template.charAt(0) === '/' || /^\w:/.test(template)
9696
? template
9797
: path.normalize(path.join(process.cwd(), template))
9898
if (exists(templatePath)) {

0 commit comments

Comments
 (0)