Skip to content

Commit

Permalink
Merge pull request #210 from 99designs/fix-nil-pointer-error
Browse files Browse the repository at this point in the history
Fix nil pointer panic in keyring
  • Loading branch information
lox committed Jan 1, 2018
2 parents 9bc62f5 + 21aa173 commit 8dbbe8d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
4 changes: 3 additions & 1 deletion cli/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ func ConfigureGlobals(app *kingpin.Application) {
if GlobalFlags.Backend != "" {
allowedBackends = append(allowedBackends, keyring.BackendType(GlobalFlags.Backend))
}

keyringImpl, err = keyring.Open(keyring.Config{
ServiceName: "aws-vault",
AllowedBackends: allowedBackends,
Expand All @@ -74,6 +73,9 @@ func ConfigureGlobals(app *kingpin.Application) {
KWalletAppID: "aws-vault",
KWalletFolder: "aws-vault",
})
if err != nil {
return err
}
}
if awsConfig == nil {
awsConfig, err = vault.LoadConfigFromEnv()
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '2.1'

services:
aws-vault:
image: golang:1.9.2
environment:
- CGO_ENABLED=0
volumes:
- .:/go/src/github.com/99designs/aws-vault
- /root/.aws
- /root/.awsvault
working_dir: /go/src/github.com/99designs/aws-vault
entrypoint: go run main.go
6 changes: 6 additions & 0 deletions vendor/github.com/99designs/keyring/kwallet.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions vendor/github.com/99designs/keyring/libsecret.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/vendor.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"ignore": "test",
"package": [
{
"checksumSHA1": "yPdUwIYrb/mMRha15K2OPS2hcSo=",
"checksumSHA1": "D8hEjr7exRaY14eEFEXCSV6YXao=",
"path": "github.com/99designs/keyring",
"revision": "864ec8407057ca036ab7f3cac503aef926fa59eb",
"revisionTime": "2017-11-28T00:42:29Z"
"revision": "5fbd4674c81065bd80b5adfee8a127c5c47e48ce",
"revisionTime": "2017-12-29T03:53:02Z"
},
{
"checksumSHA1": "KmjnydoAbofMieIWm+it5OWERaM=",
Expand Down

0 comments on commit 8dbbe8d

Please sign in to comment.