diff options
author | 2024-05-10 13:59:16 +0200 | |
---|---|---|
committer | 2024-05-11 04:11:17 +0100 | |
commit | aa32f1e126bdf947efc012d4d6b93a7150d74b24 (patch) | |
tree | 0d71617eb035f04fef08fd4a3eb76085b54b8c03 /completions | |
parent | completions/emerge: fix indentation (diff) | |
download | gentoo-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>
Diffstat (limited to 'completions')
-rw-r--r-- | completions/portageq | 2 |
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})) ;; |