-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Conversation
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, '-')) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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?
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. |
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 |
@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) |
if the file name has symbol ':', will make this error like :
'git clone' failed with status 128