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