Skip to content

Commit

Permalink
test: Fix shellcheck error SC2164 in tests/integration/molecule.shf…
Browse files Browse the repository at this point in the history
…or 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 <[email protected]>
  • Loading branch information
andygrunwald committed Sep 7, 2024
1 parent 1ec838d commit 672992d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/integration/molecule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 672992d

Please sign in to comment.