From 50a6197524eba6534cc9db5a28d2d1d44e7d898c Mon Sep 17 00:00:00 2001 From: Camden Narzt Date: Mon, 19 Aug 2024 20:33:27 -0600 Subject: [PATCH] preserve sudo env --- dev/ci/lib/functions.sh | 2 +- dev/ci/tests/apache2/run | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/ci/lib/functions.sh b/dev/ci/lib/functions.sh index c7a90e2539..58adfd670d 100644 --- a/dev/ci/lib/functions.sh +++ b/dev/ci/lib/functions.sh @@ -112,7 +112,7 @@ function sanity_check_environment() function add_bundler_path_to_gem_path() { local bundle_path - which -a bundle + if bundle_path=$(bundle show rake); then bundle_path=$(dirname "$bundle_path") bundle_path=$(dirname "$bundle_path") diff --git a/dev/ci/tests/apache2/run b/dev/ci/tests/apache2/run index 0132653d31..8406c8c5b6 100644 --- a/dev/ci/tests/apache2/run +++ b/dev/ci/tests/apache2/run @@ -6,6 +6,6 @@ run ./bin/passenger-install-apache2-module --auto if command -v rvmsudo; then run rvmsudo ./bin/passenger-install-apache2-module --auto --no-compile else -run sudo ./bin/passenger-install-apache2-module --auto --no-compile +run sudo -E -- ./bin/passenger-install-apache2-module --auto --no-compile fi run bundle exec rake "-j$COMPILE_CONCURRENCY" test:integration:apache2