diff --git a/pkg/util/azure/instance.go b/pkg/util/azure/instance.go index b6d0a0a3b9..aff99f53ee 100644 --- a/pkg/util/azure/instance.go +++ b/pkg/util/azure/instance.go @@ -663,7 +663,7 @@ func (region *SRegion) DeployVM(instanceId, name, password, publicKey string, de return nil } if len(publicKey) > 0 { - err = region.resetPublicKey(instanceId, instance.Properties.OsProfile.AdminUsername, publicKey) + return region.resetPublicKey(instanceId, instance.Properties.OsProfile.AdminUsername, publicKey) } return region.resetPassword(instanceId, instance.Properties.OsProfile.AdminUsername, password) }