Skip to content

Commit 66fb383

Browse files
authored
Remove shadowing warning when password-only (gopasspw#2245)
RELEASE_NOTES=[BUGFIX] Removing shadowing warning when using -o/--password Fixing linter too Fixes gopasspw#1961 Signed-off-by: Yolan Romailler <[email protected]>
1 parent 7286ffa commit 66fb383

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

internal/action/otp.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ func waitForKeyPress(ctx context.Context, cancel context.CancelFunc) {
8686
}
8787
}
8888

89+
//nolint: cyclop
8990
func (s *Action) otp(ctx context.Context, name, qrf string, clip, pw, recurse bool) error {
9091
sec, err := s.Store.Get(ctx, name)
9192
if err != nil {

internal/action/show.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func (s *Action) show(ctx context.Context, c *cli.Context, name string, recurse
100100
return s.List(c)
101101
}
102102

103-
if s.Store.IsDir(ctx, name) && ctxutil.IsTerminal(ctx) {
103+
if s.Store.IsDir(ctx, name) && ctxutil.IsTerminal(ctx) && !IsPasswordOnly(ctx) {
104104
out.Warningf(ctx, "%s is a secret and a folder. Use 'gopass show %s' to display the secret and 'gopass list %s' to show the content of the folder", name, name, name)
105105
}
106106

0 commit comments

Comments
 (0)