Skip to content
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

gpg: Suppress stderr from gpg-connect-agent on shell init #1051

Merged
merged 1 commit into from
Sep 1, 2024

Conversation

booxter
Copy link
Contributor

@booxter booxter commented Aug 29, 2024

In some scenarios, the command may fail, e.g. when the shell is executed with a different $HOME from where gpg agent is configured to run from.

(E.g. this happens in kitty terminal test suite.)

This patch will suppress stderr errors on tty in this situation.

Note that zsh does not allow to suppress execution of /etc/zshenv on startup, so it's impossible to skip it in the test suite environment.

An alternative would be to set IN_NIX_SHELL in the test suite, but this was rejected in upstream:

kovidgoyal/kitty#7800

There's also a kitty package specific fix posted here but this may be unnecessary once nix-darwin is patched here:

NixOS/nixpkgs#338070

In some scenarios, the command may fail, e.g. when the shell is executed
with a different $HOME from where gpg agent is configured to run from.

(E.g. this happens in kitty terminal test suite.)

This patch will suppress stderr errors on tty in this situation.

Note that zsh does not allow to suppress execution of /etc/zshenv on
startup, so it's impossible to skip it in the test suite environment.

An alternative would be to set IN_NIX_SHELL in the test suite, but this
was rejected in upstream:

kovidgoyal/kitty#7800

There's also a kitty package specific fix posted here but this may be
unnecessary once nix-darwin is patched here:

NixOS/nixpkgs#338070

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
@booxter
Copy link
Contributor Author

booxter commented Aug 29, 2024

Tested this with running ./test.py from inside the kitty nix-shell devenv. It now passes.

Copy link
Collaborator

@Enzime Enzime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks for the contribution

@Enzime Enzime merged commit 7c4b53a into LnL7:master Sep 1, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants