Skip to content

Commit

Permalink
remote: fix two dropped errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alrs authored and sagikazarmark committed Sep 27, 2019
1 parent 99520c8 commit 583f79b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions remote/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ func getConfigManager(rp viper.RemoteProvider) (crypt.ConfigManager, error) {
var err error

if rp.SecretKeyring() != "" {
kr, err := os.Open(rp.SecretKeyring())
defer kr.Close()
var kr *os.File
kr, err = os.Open(rp.SecretKeyring())
if err != nil {
return nil, err
}
defer kr.Close()
if rp.Provider() == "etcd" {
cm, err = crypt.NewEtcdConfigManager([]string{rp.Endpoint()}, kr)
} else {
Expand Down

0 comments on commit 583f79b

Please sign in to comment.