From 85e630ba21ad35cf607eaf2fdf280addfbfce905 Mon Sep 17 00:00:00 2001 From: Amitai Schleier Date: Mon, 14 Mar 2022 10:57:59 -0400 Subject: [PATCH] Don't find pkgsrc bash. It won't be in the sandbox. --- pkg_comp.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg_comp.sh b/pkg_comp.sh index d1af42c..1fee2d3 100644 --- a/pkg_comp.sh +++ b/pkg_comp.sh @@ -181,7 +181,8 @@ setup_bootstrap() { local dash_echo_test="$("${bootstrap_sh}" -c 'echo "\\100"')" if [ "$(uname -s)" != GNUkFreeBSD -a "${dash_echo_test}" = @ ]; then local bash - bash="$(which bash)" + # Avoid finding pkgsrc-installed bash, as it won't be in the sandbox + bash="$(PATH="$(echo ${PATH} | tr ':' '\n' | grep -v '^@PREFIX@/' | tr '\n' ':')" which bash)" if [ ${?} -eq 0 ]; then bootstrap_sh="${bash}" else