File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1809,12 +1809,7 @@ export class CommandCenter {
18091809
18101810 const sanitize = ( name : string ) => {
18111811 name = name . trim ( ) ;
1812-
1813- if ( ! name ) {
1814- return name ;
1815- }
1816-
1817- return name . replace ( / ^ \. | \/ \. | \. \. | ~ | \^ | : | \/ $ | \. l o c k $ | \. l o c k \/ | \\ | \* | \s | ^ \s * $ | \. $ | \[ | \] $ / g, '-' ) ;
1812+ return name && name . replace ( / ^ \. | \/ \. | \. \. | ~ | \^ | : | \/ $ | \. l o c k $ | \. l o c k \/ | \\ | \* | \s | ^ \s * $ | \. $ | \[ | \] $ / g, '-' ) ;
18181813 } ;
18191814
18201815 const resultName = await window . showInputBox ( {
@@ -1836,18 +1831,16 @@ export class CommandCenter {
18361831 }
18371832
18381833 if ( remotes . find ( r => r . name === name ) ) {
1839- window . showErrorMessage ( localize ( 'remote already exists' , ' Remote by name \" {0}\" already exists.' , name ) ) ;
1834+ window . showErrorMessage ( localize ( 'remote already exists' , " Remote ' {0}' already exists." , name ) ) ;
18401835 return ;
18411836 }
18421837
1843- const resultUrl = await window . showInputBox ( {
1838+ const url = await window . showInputBox ( {
18441839 placeHolder : localize ( 'remote url' , "Remote URL" ) ,
18451840 prompt : localize ( 'provide remote URL' , "Enter URL for remote \"{0}\"" , name ) ,
18461841 ignoreFocusOut : true
18471842 } ) ;
18481843
1849- const url = sanitize ( resultUrl || '' ) ;
1850-
18511844 if ( ! url ) {
18521845 return ;
18531846 }
You can’t perform that action at this time.
0 commit comments