diff options
author | 2022-12-05 15:29:21 -0500 | |
---|---|---|
committer | 2022-12-05 15:41:30 -0500 | |
commit | 41df717a7240eb8ff29c629331e4269cec36ee54 (patch) | |
tree | 11729ea4ce70edf35bebd46e8c301278f375da53 | |
parent | v2.0.1 (diff) | |
download | eselect-wine-41df717a7240eb8ff29c629331e4269cec36ee54.tar.gz eselect-wine-41df717a7240eb8ff29c629331e4269cec36ee54.tar.bz2 eselect-wine-41df717a7240eb8ff29c629331e4269cec36ee54.zip |
wine.eselect: silence PATH warning with doas/sudo
By default may still be noisy with shadow's su, but
util-linux's is more likely to keep wine's PATH.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
-rw-r--r-- | wine.eselect | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/wine.eselect b/wine.eselect index ff81c3d..db1d7ae 100644 --- a/wine.eselect +++ b/wine.eselect @@ -28,9 +28,11 @@ wine-run() { "${@}" - # hack wrt update given PATH is not updated in pkg_postinst (noisy) - [[ ${PATH} == @(|*:)"${EPREFIX}${WINEETC}/bin"*(/)@(|:*) || \ - ${1} == wine-update ]] || + # try to warn about about missing PATH, but stay quiet with doas/sudo + # given may be using a temporary secure PATH (also skip with update + # given PATH is not updated when ran from ebuilds in pkg_postinst) + [[ ${PATH} == @(|*:)"${EPREFIX}${WINEETC}/bin"*(/)@(|:*) || + -v DOAS_USER || -v SUDO_USER || ${1} == wine-update ]] || write_warning_msg "'${EPREFIX}${WINEETC}/bin' missing from PATH, may need to run '. ${EROOT}/etc/profile'" ${shopt_reset} |