gopass: override GOPASS_CONFIG to fix completion generation (#42400)

gopass tries to write a version number to it's configuaration, even when
just generating the shell completion scripts. This fails, as
/homeless-shelter is read-only inside the sandbox.
As error messages are printed to stdout instead of stderr
(see https://github.com/gopasspw/gopass/issues/877), the error message
lands inside the completion script, thus breaking it.

Workaround that by setting GOPASS_CONFIG to `/dev/null`
This commit is contained in:
Florian Klink 2018-06-25 00:52:15 +02:00 committed by xeji
parent 8ed38fc722
commit 1588d6a549

View File

@ -26,6 +26,9 @@ buildGoPackage rec {
$bin/share/bash-completion/completions \
$bin/share/zsh/site-functions \
$bin/share/fish/vendor_completions.d
# by default, gopass tries to write configuration to /homeless-shelter
# during startup, which lands in stdout
export GOPASS_CONFIG=/dev/null
$bin/bin/gopass completion bash > $bin/share/bash-completion/completions/_gopass
$bin/bin/gopass completion zsh > $bin/share/zsh/site-functions/_gopass
$bin/bin/gopass completion fish > $bin/share/fish/vendor_completions.d/gopass.fish