-
-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoclip on generate
broken
#2023
Comments
Thanks for reporting this. I didn't get a chance to verify it, yet. But this sounds and looks like a logic bug. Feel free to send a PR. |
Once I have time to figure out how to write a test for output redirection, I'll submit the PR and test. |
dominikschulz
added a commit
to dominikschulz/gopass
that referenced
this issue
Nov 8, 2021
Fixes gopasspw#2023 RELEASE_NOTES=[BUGFIX] Fix AutoClip handling on generate Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
dominikschulz
added a commit
that referenced
this issue
Nov 9, 2021
Fixes #2023 RELEASE_NOTES=[BUGFIX] Fix AutoClip handling on generate Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
kpitt
pushed a commit
to kpitt/gopass
that referenced
this issue
Jul 21, 2022
Fixes gopasspw#2023 RELEASE_NOTES=[BUGFIX] Fix AutoClip handling on generate Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
Currently, autoclip on
generate
does not work as I beieve was intended.Clip-on-generate currently works by checking whether one of two conditions are met:
-c
flagtrue
autoclip
true and is output being redirectedI belive (2.) to be incorrect autoclipping behavior, and discordant with the comment preceding it:
As can be seen, the code actually checks that output is being redirected, i.e. the output file descriptor is not a TTY.
Steps To Reproduce
gopass config autoclip true
gopass generate -f foobar 24
foobar
will not be copied to clipboardUnexpected behavior
gopass config autoclip true
gopass generate -f foobar 24 | cat
foobar
will be copied to clipboardExpected behavior
In the above scenarios, I exect the contents of
foobar
to be copied to the clipboard in the first scenario, but not the second. In other words, the inverse of the actual behavior.Environment
163164715120.04930e87cdev-Ubuntu SMP Thu Sep 16 19:26:07 x86_64 x86_64 x86_64 GNU/Linuxgo install
of latestAdditional context
I'm happy to submit a PR for the fix if this is confirmed to be unexpected behavior.
The text was updated successfully, but these errors were encountered: