Make sure sshkey is not nil

pull/7118/head
wizurijyq 7 years ago committed by GitHub
parent 74abd80c4f
commit 8184fcb99a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -43,6 +43,10 @@ func (s *stepCreateServer) Run(ctx context.Context, state multistep.StateBag) mu
state.Put("error", fmt.Errorf("Error fetching SSH key: %s", err))
return multistep.ActionHalt
}
if sshKey == nil {
state.Put("error", fmt.Errorf("Could not find key: %s", k))
return multistep.ActionHalt
}
sshKeys = append(sshKeys, sshKey)
}

Loading…
Cancel
Save