Skip to content

Commit

Permalink
Add warning when parsing secret content (gopasspw#1950)
Browse files Browse the repository at this point in the history
RELEASE_NOTES=[ENHANCEMENT] Add warning when parsing content

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
  • Loading branch information
dominikschulz authored Jul 1, 2021
1 parent a8a7252 commit f0f6d93
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/action/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ func (s *Action) showHandleOutput(ctx context.Context, name string, sec gopass.S
header := fmt.Sprintf("Secret: %s\n", name)
if HasKey(ctx) {
header += fmt.Sprintf("Key: %s\n", GetKey(ctx))
} else if ctxutil.IsShowParsing(ctx) {
out.Warning(ctx, "Parsing is enabled. Use -n to disable.")
}
out.Print(ctx, header)
}
Expand Down

0 comments on commit f0f6d93

Please sign in to comment.