-agent-address flag should have higher precedence than the env var (#28574)

* -agent-address flag should have higher precedence than the env var

* add changelog
This commit is contained in:
Josh Black
2024-10-04 11:29:03 -07:00
committed by GitHub
parent d1355cb98f
commit 7307c56f59
2 changed files with 4 additions and 1 deletions

3
changelog/28574.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:bug
cli: Fixed a CLI precedence issue where -agent-address didn't override VAULT_AGENT_ADDR as it should
```

View File

@@ -106,7 +106,7 @@ func (c *BaseCommand) Client() (*api.Client, error) {
config.Address = c.flagAddress
}
if c.flagAgentProxyAddress != "" {
config.Address = c.flagAgentProxyAddress
config.AgentAddress = c.flagAgentProxyAddress
}
if c.flagOutputCurlString {