mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-08 16:22:15 -04:00
Merge pull request #8047 from hashicorp/avoid_panic_when_token_in_azure_builder
azure builder: avoid a panic in getObjectIdFromToken
This commit is contained in:
commit
c475eb57ef
1 changed files with 2 additions and 1 deletions
|
|
@ -439,8 +439,9 @@ func getObjectIdFromToken(ui packer.Ui, token *adal.ServicePrincipalToken) strin
|
|||
ui.Error(fmt.Sprintf("Failed to parse the token,Error: %s", err.Error()))
|
||||
return ""
|
||||
}
|
||||
return claims["oid"].(string)
|
||||
|
||||
oid, _ := claims["oid"].(string)
|
||||
return oid
|
||||
}
|
||||
|
||||
func normalizeAzureRegion(name string) string {
|
||||
|
|
|
|||
Loading…
Reference in a new issue