File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -225,10 +225,16 @@ async function init() {
225225 process . exit ( 1 )
226226 }
227227
228- const githubPath = await textPrompt ( 'GitHub path, e.g. skirtles-code/test-project (optional)' )
228+ console . log ( )
229+ console . log ( 'The GitHub path you provide below is used to generate various URLs.' )
230+ console . log ( 'For example, if you intended to have your repo at https://github.com/vuejs/core then the path would be vuejs/core.' )
231+ console . log ( )
232+
233+ const rawGithubPath = await textPrompt ( 'GitHub path (optional)' )
234+ const githubPath = rawGithubPath . replace ( / ^ ( h t t p s : \/ \/ g i t h u b .c o m \/ | \/ ) / , '' )
229235
230- if ( githubPath && ! / ^ [ \w - ] + \/ [ \w - ] + $ / . test ( githubPath ) ) {
231- console . log ( 'Invalid GitHub path: ' + githubPath )
236+ if ( rawGithubPath && ! / ^ [ ^ \/ ] + \/ [ ^ \/ ] + $ / . test ( githubPath ) ) {
237+ console . log ( 'Invalid GitHub path: ' + rawGithubPath )
232238 process . exit ( 1 )
233239 }
234240
You can’t perform that action at this time.
0 commit comments