From ea7d8b6e87cca49083d2033cd39bb453a8cace6c Mon Sep 17 00:00:00 2001 From: Julien Loizelet Date: Tue, 1 Oct 2024 08:49:19 +0900 Subject: [PATCH] feat(test): Disable history expansion at the top of the step [skip ci] --- action.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/action.yaml b/action.yaml index 723554c..e62ed24 100644 --- a/action.yaml +++ b/action.yaml @@ -107,9 +107,14 @@ runs: DDEV_NO_INSTRUMENTATION: "true" # Use test_command input if provided TEST_COMMAND_INPUT: ${{ inputs.test_command }} + # Use the addon path + ADDON_PATH: ${{ inputs.addon_path }} shell: bash # Using set +H to avoid history expansion in bash when using ! in test_command run: | + echo "Before set +H: $-" + set +H + echo "After set +H: $-" if [ -n "$TEST_COMMAND_INPUT" ]; then TEST_COMMAND="$TEST_COMMAND_INPUT" elif [ "${{ github.event_name }}" == "pull_request" ]; then @@ -117,8 +122,8 @@ runs: else TEST_COMMAND="bats tests" fi - set +H - cd ${{ inputs.addon_path }} && $TEST_COMMAND + echo "Running: $TEST_COMMAND in $ADDON_PATH" + cd $ADDON_PATH && $TEST_COMMAND # keepalive-workflow keeps GitHub from turning off tests after 60 days - uses: gautamkrishnar/keepalive-workflow@v2