summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucio Sauer <watermanpaint@posteo.net>2024-05-10 13:59:16 +0200
committerSam James <sam@gentoo.org>2024-05-11 04:11:17 +0100
commitaa32f1e126bdf947efc012d4d6b93a7150d74b24 (patch)
tree0d71617eb035f04fef08fd4a3eb76085b54b8c03
parentcompletions/emerge: fix indentation (diff)
downloadgentoo-bashcomp-aa32f1e126bdf947efc012d4d6b93a7150d74b24.tar.gz
gentoo-bashcomp-aa32f1e126bdf947efc012d4d6b93a7150d74b24.tar.bz2
gentoo-bashcomp-aa32f1e126bdf947efc012d4d6b93a7150d74b24.zip
portageq envvar: preserve PATH to avoid command validation warnings
Some of Portage's environment variables undergo command validation. When one is set to a relative value, Portage relies on PATH to find the binary. We need to preserve it after purging the environment (`env -i`) if we want to avoid "<key> is invalid: <value>" warnings. For Portage 3.0.63, this affects PORTAGE_{B{,UN}ZIP2_COMMAND,LOG_FILTER_FILE_CMD}. Bug: https://bugs.gentoo.org/588642 Signed-off-by: Lucio Sauer <watermanpaint@posteo.net> Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--completions/portageq2
1 files changed, 1 insertions, 1 deletions
diff --git a/completions/portageq b/completions/portageq
index 7922e59..a8a113b 100644
--- a/completions/portageq
+++ b/completions/portageq
@@ -47,7 +47,7 @@ _portageq() {
# this also isn't the fastest, but I welcome an alternative method
envvar)
- COMPREPLY=($(compgen -W "$(env -i emerge -v --info | \
+ COMPREPLY=($(compgen -W "$(env -i PATH="${PATH}" emerge -v --info | \
sed -n -e '/^[[:upper:]].*=".*"/s/^\(.*\)=".*$/\1/p')" -- ${cur}))
;;