diff --git a/command/agent/command.go b/command/agent/command.go index d30958a5b..34567c0e2 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -256,16 +256,12 @@ func (c *Command) readConfig() *Config { // Check to see if we should read the Vault token from the environment if config.Vault.Token == "" { - if token, ok := os.LookupEnv("VAULT_TOKEN"); ok { - config.Vault.Token = token - } + config.Vault.Token = os.Getenv("VAULT_TOKEN") } // Check to see if we should read the Vault namespace from the environment if config.Vault.Namespace == "" { - if ns, ok := os.LookupEnv("VAULT_NAMESPACE"); ok { - config.Vault.Namespace = ns - } + config.Vault.Namespace = os.Getenv("VAULT_NAMESPACE") } // Default the plugin directory to be under that of the data directory if it