Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the vue init error from private repository in window OS #565

Merged
merged 4 commits into from
Feb 5, 2018

Conversation

kospot
Copy link

@kospot kospot commented Aug 18, 2017

if the file name has symbol ':', will make this error like :
'git clone' failed with status 128

kospot added 2 commits August 18, 2017 10:34
fix the file name can not include symbol ':'
when use http mode, download error
bin/vue-init Outdated
@@ -65,7 +65,7 @@ var name = inPlace ? path.relative('../', process.cwd()) : rawName
var to = path.resolve(rawName || '.')
var clone = program.clone || false

var tmp = path.join(home, '.vue-templates', template.replace(/\//g, '-'))
var tmp = path.join(home, '.vue-templates', template.replace(/[\/|:]/g, '-'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when do you need to replace the | character?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the | character means or

and is that you planing publish the npm package ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using [] will already do an or
I don't get your question, can you rephrase it, please?

@posva posva mentioned this pull request Aug 20, 2017
@rwb7041
Copy link

rwb7041 commented Sep 12, 2017

Is there a timeline of when this change will be added to the cli and published to NPM? This change will help me out a lot as I have a custom template I've been using out of a private repo and I can use that template on my mac just fine, but I cant on my windows machine due to the filename error.

@weizhenye
Copy link

weizhenye commented Sep 25, 2017

@posva @yyx990803

Could you please modify this PR yourself and merge it? There are hundreds issues and PRs ( #438 #518 #525 #543 #567 ) trying to fix this bug which already exists 8 months. Or just reopen and merge #567

@posva
Copy link
Member

posva commented Sep 26, 2017

This PR is not solving those issues... It's still not clear to me what is this solving that doesn't work on current vue-cli version
edit: Unless it's a windows error which I haven't been able to test

@rwb7041
Copy link

rwb7041 commented Sep 26, 2017

@posva It's solving a windows error that prevents the vue-cli from being able to use template that are not on github, such as templates in private bitbucket repositories. The cli fails because it tries to make a folder with a colon in the name, and colons are not allowed in file/folder names on windows, just like the \ character. (I found the full list of reserved characters for Windows here: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants