Skip to content

Commit 1fba937

Browse files
Suppress setup messages on gopass version (#2327)
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]>
1 parent 2723cfc commit 1fba937

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/action/version.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ func (s *Action) Version(c *cli.Context) error {
2525
version := make(chan string, 1)
2626
go s.checkVersion(ctx, version)
2727

28-
_ = s.IsInitialized(c)
28+
// suppress setup output in version
29+
{
30+
c2 := c
31+
c2.Context = ctxutil.WithHidden(c.Context, true)
32+
_ = s.IsInitialized(c2)
33+
}
2934

3035
cli.VersionPrinter(c)
3136

0 commit comments

Comments
 (0)