From b705bade44973e61655d5f847f49d97fb5bb8393 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:21:09 +0100 Subject: [PATCH] ci: Export `IN_GETOPT_BIN` on macOS This variable is required for the `retry` script. --- ci/test/01_base_install.sh | 9 ++------- ci/test/02_run_container.sh | 5 +++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ci/test/01_base_install.sh b/ci/test/01_base_install.sh index e11936fae8d..a0b054ab40b 100755 --- a/ci/test/01_base_install.sh +++ b/ci/test/01_base_install.sh @@ -31,13 +31,8 @@ elif [ "$CI_OS_NAME" != "macos" ]; then fi if [ -n "$PIP_PACKAGES" ]; then - if [ "$CI_OS_NAME" == "macos" ]; then - # shellcheck disable=SC2086 - IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES - else - # shellcheck disable=SC2086 - ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES - fi + # shellcheck disable=SC2086 + ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES fi if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then diff --git a/ci/test/02_run_container.sh b/ci/test/02_run_container.sh index a7c1e22a6db..f0bb5411379 100755 --- a/ci/test/02_run_container.sh +++ b/ci/test/02_run_container.sh @@ -54,6 +54,11 @@ else mkdir -p "${PREVIOUS_RELEASES_DIR}" fi +if [ "$CI_OS_NAME" == "macos" ]; then + IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt" + export IN_GETOPT_BIN +fi + CI_EXEC () { $CI_EXEC_CMD_PREFIX bash -c "export PATH=${BINS_SCRATCH_DIR}:${BASE_ROOT_DIR}/ci/retry:\$PATH && cd \"${BASE_ROOT_DIR}\" && $*" }