Skip to content

Commit

Permalink
Default to default password store dir (#846)
Browse files Browse the repository at this point in the history
Fixes #844
  • Loading branch information
dominikschulz authored Jun 4, 2018
1 parent c36481b commit 80b8bd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/action/action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestNew(t *testing.T) {
sv := semver.Version{}

_, err = New(ctx, cfg, sv)
assert.Error(t, err)
assert.NoError(t, err)

cfg.Root.Path = backend.FromPath(filepath.Join(td, "store"))
cfg.Root.Path.Crypto = backend.Plain
Expand Down
4 changes: 1 addition & 3 deletions pkg/store/root/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
"github.com/gopasspw/gopass/pkg/config"
"github.com/gopasspw/gopass/pkg/store"
"github.com/gopasspw/gopass/pkg/store/sub"

"github.com/pkg/errors"
)

// Store is the public facing password store
Expand All @@ -30,7 +28,7 @@ func New(ctx context.Context, cfg *config.Config) (*Store, error) {
cfg = &config.Config{}
}
if cfg.Root != nil && (cfg.Root.Path == nil || cfg.Root.Path.Path == "") {
return nil, errors.Errorf("need path")
cfg.Root.Path = backend.FromPath(config.PwStoreDir(""))
}
r := &Store{
cfg: cfg,
Expand Down

0 comments on commit 80b8bd7

Please sign in to comment.