Skip to content

Commit

Permalink
Suppress setup messages on gopass version (#2327)
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 #2325

Signed-off-by: Dominik Schulz <[email protected]>

Signed-off-by: Dominik Schulz <[email protected]>
  • Loading branch information
dominikschulz authored Sep 4, 2022
1 parent 2723cfc commit 1fba937
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 1fba937

Please sign in to comment.