mirror of https://github.com/k3s-io/k3s
Adding error check when read instance id failed
parent
9796900306
commit
52811375d1
|
@ -94,6 +94,9 @@ func readInstanceID(cfg *VSphereConfig) (string, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
if out.Len() == 0 {
|
||||||
|
return "", fmt.Errorf("unable to retrieve Instance ID")
|
||||||
|
}
|
||||||
|
|
||||||
// Create context
|
// Create context
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
|
|
Loading…
Reference in New Issue