1
0
mirror of https://github.com/byReqz/go-etcher.git synced 2025-09-13 01:07:03 +00:00

add recursion to getpath and getdest

This commit is contained in:
Nils
2022-01-13 23:32:55 +01:00
parent 79e7417126
commit 37348c71aa

View File

@@ -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
}