Skip to content

Commit

Permalink
Remove the broken initialization of the Vault URL in api.NewClient()
Browse files Browse the repository at this point in the history
The variable c.Address is set with a default address (https://127.0.0.1:8200)
or with the environment variable VAULT_ADDR when set.

Remove the initialization of the Vault URL in api.NewClient() that ends up
in assigning the default address if the VAULT_ADDR is set instead of the
value of the environment variable.

Signed-off-by: Davide Madrisan <[email protected]>
  • Loading branch information
madrisan committed Sep 24, 2019
1 parent 7e4d030 commit 3977a34
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions command/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ func (c *BaseCommand) Client() (*api.Client, error) {
config.Error.Error())
}

if c.Address != "" {
config.Address = c.Address
}

client, err := api.NewClient(config)
if err != nil {
return nil, err
Expand Down

0 comments on commit 3977a34

Please sign in to comment.