mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-29 20:10:56 -08:00
fix(az): map User to UserName
avoid collision with default .User in template
This commit is contained in:
parent
5c586696ac
commit
2ea2e633b8
|
@ -38,7 +38,7 @@ properties below - defaults to `{{.Name}}`
|
|||
- `.Name`: `string` - the account name
|
||||
- `.State`: `string` - the account state
|
||||
- `.TenantID`: `string` - the tenant id
|
||||
- `.User.Name`: `string` - the user name
|
||||
- `.UserName`: `string` - the user name
|
||||
- `.Origin`: `string` - where we received the information from, can be `CLI` or `PWSH`
|
||||
|
||||
[go-text-template]: https://golang.org/pkg/text/template/
|
||||
|
|
|
@ -21,7 +21,7 @@ type AzureConfig struct {
|
|||
|
||||
type AzureSubscription struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
UserName string `json:"name"`
|
||||
State string `json:"state"`
|
||||
User *AzureUser `json:"user"`
|
||||
IsDefault bool `json:"isDefault"`
|
||||
|
@ -153,7 +153,7 @@ func (a *az) getAzureRmContext() bool {
|
|||
a.EnvironmentName = defaultContext.Environment.Name
|
||||
a.TenantID = defaultContext.Tenant.ID
|
||||
a.ID = defaultContext.Subscription.ID
|
||||
a.Name = defaultContext.Subscription.Name
|
||||
a.UserName = defaultContext.Subscription.Name
|
||||
a.State = defaultContext.Subscription.State
|
||||
a.User = &AzureUser{
|
||||
Name: defaultContext.Subscription.ExtendedProperties.Account,
|
||||
|
|
Loading…
Reference in a new issue