mirror of
				https://github.com/byReqz/go-etcher.git
				synced 2025-11-04 00:31:31 +00:00 
			
		
		
		
	add recursion to getpath and getdest
This commit is contained in:
		
							
								
								
									
										8
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								main.go
									
									
									
									
									
								
							@@ -37,6 +37,10 @@ func GetPath() string {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		return homedir + path[1:]
 | 
							return homedir + path[1:]
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						if path == "" {
 | 
				
			||||||
 | 
							fmt.Println("[", color.RedString("!"), "]  No image given, retrying.")
 | 
				
			||||||
 | 
							path = GetPath()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	return path
 | 
						return path
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -53,6 +57,10 @@ func GetDest() string {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		return homedir + dest[1:]
 | 
							return homedir + dest[1:]
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						if dest == "" {
 | 
				
			||||||
 | 
							fmt.Println("[", color.RedString("!"), "]  No destination given, retrying.")
 | 
				
			||||||
 | 
							dest = GetDest()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	return dest
 | 
						return dest
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user