mirror of https://gogs.blitter.com/RLabs/xs
				
				
				
			Suppress Gimme Cookie prompt when in gopt (-g) authtoken create mode
This commit is contained in:
		
							parent
							
								
									b2e43f4bad
								
							
						
					
					
						commit
						0913311351
					
				
							
								
								
									
										10
									
								
								xs/xs.go
								
								
								
								
							
							
						
						
									
										10
									
								
								xs/xs.go
								
								
								
								
							| 
						 | 
				
			
			@ -1007,10 +1007,14 @@ func main() { //nolint: funlen, gocyclo
 | 
			
		|||
	})
 | 
			
		||||
 | 
			
		||||
	if authCookie == "" {
 | 
			
		||||
		// No auth token, prompt for password
 | 
			
		||||
		fmt.Printf("Gimme cookie:")
 | 
			
		||||
		if !gopt {
 | 
			
		||||
			// No auth token, prompt for password
 | 
			
		||||
			fmt.Printf("Gimme cookie:")
 | 
			
		||||
		}
 | 
			
		||||
		ab, e := xs.ReadPassword(os.Stdin.Fd())
 | 
			
		||||
		fmt.Printf("\r\n")
 | 
			
		||||
		if !gopt {
 | 
			
		||||
			fmt.Printf("\r\n")
 | 
			
		||||
		}
 | 
			
		||||
		if e != nil {
 | 
			
		||||
			panic(e)
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue