Skip to content

Commit

Permalink
Suppress setup messages on gopass version
Browse files Browse the repository at this point in the history
gopass version might be run on an uninitialized instance (e.g. during
tests). We want to avoid the setup message there.

RELEASE_NOTES=[BUGFIX] Do not show setup message on version

Fixes gopasspw#2325

Signed-off-by: Dominik Schulz <[email protected]>
  • Loading branch information
dominikschulz committed Sep 4, 2022
1 parent 5b92d2d commit c143bee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/action/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ func (s *Action) Version(c *cli.Context) error {
version := make(chan string, 1)
go s.checkVersion(ctx, version)

_ = s.IsInitialized(c)
// suppress setup output in version
{
c2 := c
c2.Context = ctxutil.WithHidden(c.Context, true)
_ = s.IsInitialized(c2)
}

cli.VersionPrinter(c)

Expand Down

0 comments on commit c143bee

Please sign in to comment.