Commit 52811375 authored by dagnello's avatar dagnello

Adding error check when read instance id failed

parent 97969003
...@@ -94,6 +94,9 @@ func readInstanceID(cfg *VSphereConfig) (string, error) { ...@@ -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())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment