Skip to content

Commit

Permalink
Fix bug where option validation always fails
Browse files Browse the repository at this point in the history
  • Loading branch information
lox committed Oct 10, 2015
1 parent 50147ff commit e1babc5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ type VaultProvider struct {
}

func NewVaultProvider(k keyring.Keyring, profile string, opts VaultOptions) (*VaultProvider, error) {
opts = opts.ApplyDefaults()
if err := opts.Validate(); err != nil {
return nil, err
}
Expand All @@ -74,7 +75,7 @@ func NewVaultProvider(k keyring.Keyring, profile string, opts VaultOptions) (*Va
return nil, err
}
return &VaultProvider{
VaultOptions: opts.ApplyDefaults(),
VaultOptions: opts,
keyring: k,
profile: profile,
profiles: profiles,
Expand Down

0 comments on commit e1babc5

Please sign in to comment.