From aa32f1e126bdf947efc012d4d6b93a7150d74b24 Mon Sep 17 00:00:00 2001 From: Lucio Sauer Date: Fri, 10 May 2024 13:59:16 +0200 Subject: 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 " is invalid: " 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 Signed-off-by: Sam James --- completions/portageq | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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})) ;; -- cgit v1.2.3-65-gdbad