commit: 41df717a7240eb8ff29c629331e4269cec36ee54 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Mon Dec 5 20:29:21 2022 +0000 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> CommitDate: Mon Dec 5 20:41:30 2022 +0000 URL: https://gitweb.gentoo.org/proj/eselect-wine.git/commit/?id=41df717a
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 <AT> gentoo.org> wine.eselect | 8 +++++--- 1 file 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}