mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-14 04:38:00 -08:00
parent
6ee998af15
commit
5055dfc84a
|
@ -40,7 +40,7 @@ func (a *aws) enabled() bool {
|
|||
if a.Profile != "" && a.Region != "" {
|
||||
return true
|
||||
}
|
||||
if a.Profile == "" && a.Region != "" {
|
||||
if a.Profile == "" && a.Region != "" && displayDefaultUser {
|
||||
a.Profile = defaultUser
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@ func TestAWSSegment(t *testing.T) {
|
|||
Template string
|
||||
DisplayDefault bool
|
||||
}{
|
||||
{Case: "enabled with default user", ExpectedString: "default@eu-west", Region: "eu-west", ExpectedEnabled: true, DisplayDefault: true},
|
||||
{Case: "disabled with default user", ExpectedString: "default@eu-west", Region: "eu-west", ExpectedEnabled: false, DisplayDefault: false},
|
||||
{Case: "disabled", ExpectedString: "", ExpectedEnabled: false},
|
||||
{Case: "enabled with default user", ExpectedString: "default@eu-west", Profile: "default", Region: "eu-west", ExpectedEnabled: true, DisplayDefault: true},
|
||||
{Case: "disabled with default user", ExpectedString: "default", Profile: "default", Region: "eu-west", ExpectedEnabled: false, DisplayDefault: false},
|
||||
|
|
Loading…
Reference in a new issue