add recursion to getpath and getdest

This commit is contained in:
Nils 2022-01-13 23:32:55 +01:00
parent 79e7417126
commit 37348c71aa
Signed by: byreqz
GPG Key ID: 396A62D7D436749E
1 changed files with 8 additions and 0 deletions

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
}