File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 11package  menu
22
33import  (
4+ 	"bufio" 
45	"fmt" 
56	"os" 
67	"path/filepath" 
@@ -1050,8 +1051,12 @@ func changeScanRoots(app Application, config *config.Config) {
10501051
10511052	if  utils .Confirm ("Would you like to add a new scan root?" ) {
10521053		fmt .Print ("Enter path to scan: " )
1053- 		var  newRoot  string 
1054- 		fmt .Scanln (& newRoot )
1054+ 		scanner  :=  bufio .NewScanner (os .Stdin )
1055+ 		scanner .Scan ()
1056+ 		newRoot  :=  strings .TrimSpace (scanner .Text ())
1057+ 
1058+ 		// Handle quoted paths by removing quotes if present 
1059+ 		newRoot  =  strings .Trim (newRoot , "\" " )
10551060
10561061		if  newRoot  !=  ""  {
10571062			config .CustomEngineRoots  =  append (config .CustomEngineRoots , newRoot )
@@ -1070,8 +1075,9 @@ func changeBranch(app Application, config *config.Config) {
10701075
10711076	fmt .Printf ("Current branch: %s\n " , config .DefaultRemoteBranch )
10721077	fmt .Print ("Enter new branch name: " )
1073- 	var  newBranch  string 
1074- 	fmt .Scanln (& newBranch )
1078+ 	scanner  :=  bufio .NewScanner (os .Stdin )
1079+ 	scanner .Scan ()
1080+ 	newBranch  :=  strings .TrimSpace (scanner .Text ())
10751081
10761082	if  newBranch  !=  ""  {
10771083		config .DefaultRemoteBranch  =  newBranch 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments