From 038434dd9f86654f6274ab5e08ac793ba12e7e68 Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro Date: Thu, 18 Aug 2016 01:11:17 +0300 Subject: [PATCH] Ensure that a clean environment is used to launch Nginx in tests This avoids potential issues when running the tests in environments which might set variables which Nginx tries to read on startup. For example, the $NGINX variable was being picked from the Travis-CI build matrix configuration. --- t/preamble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/preamble b/t/preamble index 487fd75..a571381 100644 --- a/t/preamble +++ b/t/preamble @@ -40,7 +40,7 @@ rm -f "${NGINX_CONF}" "${NGINX_PID}" mkdir -p "${PREFIX}/logs" function nginx () { - "${PREFIX}/sbin/nginx" "$@" + env - PATH="${PATH}" "${PREFIX}/sbin/nginx" "$@" } function nginx_conf () {