File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -220,19 +220,26 @@ def collect_setup_info() -> SetupInfo:
220220        carousel = True ,
221221    )
222222
223+     git_remote  =  "" 
223224    try :
224225        repo  =  Repo (str (module_root ), search_parent_directories = True )
225226        git_remotes  =  get_git_remotes (repo )
226-         if  len (git_remotes ) >  1 :
227-             git_remote  =  inquirer_wrapper (
228-                 inquirer .list_input ,
229-                 message = "What git remote do you want Codeflash to use for new Pull Requests? " ,
230-                 choices = git_remotes ,
231-                 default = "origin" ,
232-                 carousel = True ,
233-             )
227+         if  git_remotes :  # Only proceed if there are remotes 
228+             if  len (git_remotes ) >  1 :
229+                 git_remote  =  inquirer_wrapper (
230+                     inquirer .list_input ,
231+                     message = "What git remote do you want Codeflash to use for new Pull Requests? " ,
232+                     choices = git_remotes ,
233+                     default = "origin" ,
234+                     carousel = True ,
235+                 )
236+             else :
237+                 git_remote  =  git_remotes [0 ]
234238        else :
235-             git_remote  =  git_remotes [0 ]
239+             click .echo (
240+                 "No git remotes found. You can still use Codeflash locally, but you'll need to set up a remote " 
241+                 "repository to use GitHub features." 
242+             )
236243    except  InvalidGitRepositoryError :
237244        git_remote  =  "" 
238245
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments