From becdab3346be62946f11a28ce4a3583ede2f54fe Mon Sep 17 00:00:00 2001 From: Andy Grunwald Date: Sat, 7 Sep 2024 15:56:30 +0200 Subject: [PATCH] test: Fix shellcheck error SC2164 in `tests/integration/molecule.sh`for Ansible 2.17 Full error: ERROR: tests/integration/molecule.sh:54:1: SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. Signed-off-by: Andy Grunwald --- tests/integration/molecule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/molecule.sh b/tests/integration/molecule.sh index 4a0cf526..12002135 100755 --- a/tests/integration/molecule.sh +++ b/tests/integration/molecule.sh @@ -51,5 +51,5 @@ unset _ANSIBLE_COVERAGE_CONFIG unset ANSIBLE_PYTHON_INTERPRETER # Run molecule test -cd "$role_root" +cd "$role_root" || { echo "Fail to change directory into $role_root"; exit 1; } molecule -c "$collection_root/.config/molecule/config.yml" test -s "$scenario"