need valid url or dir to import something

This commit is contained in:
Christian Goll
2022-01-18 15:41:31 +01:00
parent 558f5ef65b
commit b426482d82

View File

@@ -99,9 +99,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
wwlog.Printf(wwlog.ERROR, "VNFS Name exists, specify --force, --update, or choose a different name: %s\n", name)
os.Exit(1)
}
}
if strings.HasPrefix(uri, "docker://") || strings.HasPrefix(uri, "docker-daemon://") {
} else if strings.HasPrefix(uri, "docker://") || strings.HasPrefix(uri, "docker-daemon://") {
sCtx, err := getSystemContext()
if err != nil {
wwlog.Printf(wwlog.ERROR, "%s\n", err)
@@ -120,6 +118,9 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
_ = container.DeleteSource(name)
os.Exit(1)
}
} else {
wwlog.Printf(wwlog.ERROR, "Invalid dir or uri: %s\n", uri)
os.Exit(1)
}
fmt.Printf("Updating the container's /etc/resolv.conf\n")