File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -371,15 +371,15 @@ async function resolveRepoFromInit($: Shell, options: InitOptions) {
371371 if ( options . repo . includes ( '://' ) || options . repo . endsWith ( '.git' ) ) {
372372 return { url : options . repo , branch : options . branch } ;
373373 }
374- const [ owner , name ] = options . repo . split ( '/' ) ;
375- if ( owner && name ) {
376- return { owner, name, branch : options . branch } ;
377- }
378- // If only a name is provided (no slash), use it as the repo name with auto-detected owner
379- if ( options . repo && ! options . repo . includes ( '/' ) ) {
380- const owner = await getAuthenticatedUser ( $ ) ;
381- return { owner, name : options . repo , branch : options . branch } ;
374+ if ( options . repo . includes ( '/' ) ) {
375+ const [ owner , name ] = options . repo . split ( '/' ) ;
376+ if ( owner && name ) {
377+ return { owner, name, branch : options . branch } ;
378+ }
382379 }
380+
381+ const owner = await getAuthenticatedUser ( $ ) ;
382+ return { owner, name : options . repo , branch : options . branch } ;
383383 }
384384
385385 // Default: auto-detect owner, use default repo name
You can’t perform that action at this time.
0 commit comments