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

[PR #4219/77a0c139 backport][stable-4] passwordstore: Fix error detection for non-English locales #4221

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Feb 17, 2022

This is a backport of PR #4219 as merged into main (77a0c13).

SUMMARY

The passwordstore lookup plugin depends on parsing GnuPG's
error messages in English language. As a result, detection of
a specific error failes when users set a different locale.

This change corrects this by setting the LANGUAGE environment
variable to C when invoking pass, as this only affects
gettext translations.

See
https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

passwordstore
plugins/lookup/passwordstore

ADDITIONAL INFORMATION

Originally discussed in #4912

The passwordstore lookup plugin depends on parsing GnuPG's
error messages in English language. As a result, detection of
a specific error failes when users set a different locale.

This change corrects this by setting the `LANGUAGE` environment
variable to `C` when invoking `pass`, as this only affects
gettext translations.

See
https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html

(cherry picked from commit 77a0c13)
@ansibullbot ansibullbot added backport bug This issue/PR relates to a bug lookup lookup plugin new_contributor Help guide this first time contributor plugins plugin (any type) labels Feb 17, 2022
@felixfontein felixfontein merged commit b3963fd into stable-4 Feb 17, 2022
@felixfontein felixfontein deleted the patchback/backports/stable-4/77a0c139c9c929fb08d3b9c7eb3409b08bdb6857/pr-4219 branch February 17, 2022 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug lookup lookup plugin new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants