Skip to content

Commit

Permalink
Fix the crash that occurs when no tenant ID is configured in Azure CLI (
Browse files Browse the repository at this point in the history
  • Loading branch information
teowa authored Nov 7, 2024
1 parent 8b33d82 commit 53a8509
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/clients/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ func (account *ResourceManagerAccount) GetTenantId() string {
log.Printf("[DEBUG] Error getting default tenant ID: %s", err)
}

if account.tenantId == nil {
log.Printf("[DEBUG] No default tenant ID found")
return ""
}

return *account.tenantId
}

Expand Down

0 comments on commit 53a8509

Please sign in to comment.