mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 09:39:08 +00:00
Add missing case when running non existent file in hyperkit
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
d9869fb727
commit
4a374eb175
@ -70,7 +70,7 @@ func runHyperKit(args []string) {
|
|||||||
info, err := os.Stat(path)
|
info, err := os.Stat(path)
|
||||||
stat := err == nil
|
stat := err == nil
|
||||||
|
|
||||||
/// ignore a directory
|
// ignore a directory
|
||||||
if stat && info.Mode().IsDir() {
|
if stat && info.Mode().IsDir() {
|
||||||
stat = false
|
stat = false
|
||||||
}
|
}
|
||||||
@ -111,6 +111,11 @@ func runHyperKit(args []string) {
|
|||||||
log.Fatalf("Hyperkit requires --uefi to be set to boot an ISO")
|
log.Fatalf("Hyperkit requires --uefi to be set to boot an ISO")
|
||||||
}
|
}
|
||||||
isoPaths = append(isoPaths, path)
|
isoPaths = append(isoPaths, path)
|
||||||
|
default:
|
||||||
|
if !stat {
|
||||||
|
log.Fatalf("Cannot find file %s to boot", path)
|
||||||
|
}
|
||||||
|
log.Fatalf("Unrecognised boot type, please specify on command line")
|
||||||
}
|
}
|
||||||
|
|
||||||
if *uefiBoot {
|
if *uefiBoot {
|
||||||
|
Loading…
Reference in New Issue
Block a user