summary refs log tree commit diff
path: root/pkgs/tools/security/gopass
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2018-06-25 00:52:15 +0200
committerxeji <36407913+xeji@users.noreply.github.com>2018-06-25 00:52:15 +0200
commit1588d6a549675836c43b0caced47d1778e099236 (patch)
treec5b7a439651427f91510582f545e1791ba93a5e3 /pkgs/tools/security/gopass
parent8ed38fc722e0a2cb48f47ddbfd419ceb68226564 (diff)
downloadnixlib-1588d6a549675836c43b0caced47d1778e099236.tar
nixlib-1588d6a549675836c43b0caced47d1778e099236.tar.gz
nixlib-1588d6a549675836c43b0caced47d1778e099236.tar.bz2
nixlib-1588d6a549675836c43b0caced47d1778e099236.tar.lz
nixlib-1588d6a549675836c43b0caced47d1778e099236.tar.xz
nixlib-1588d6a549675836c43b0caced47d1778e099236.tar.zst
nixlib-1588d6a549675836c43b0caced47d1778e099236.zip
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`
Diffstat (limited to 'pkgs/tools/security/gopass')
-rw-r--r--pkgs/tools/security/gopass/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix
index 2d7f8b86f009..25102fd07303 100644
--- a/pkgs/tools/security/gopass/default.nix
+++ b/pkgs/tools/security/gopass/default.nix
@@ -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