do not access cluster name if it's not found

This commit is contained in:
iwilltry42 2020-02-03 11:36:27 +01:00
parent 2d35895edc
commit 66d545e034
No known key found for this signature in database
GPG Key ID: 7BA57AD1CFF16110

View File

@ -37,7 +37,7 @@ import (
func LoadImagesIntoCluster(runtime runtimes.Runtime, images []string, cluster *k3d.Cluster, keepTarball bool) error {
cluster, err := k3dc.GetCluster(cluster, runtime)
if err != nil {
log.Errorf("Failed to get cluster '%s'", cluster.Name)
log.Errorf("Failed to find the specified cluster")
return err
}