nick-fields/retry

on_retry_command not respecting shell choice

bkonicek-calm opened this issue · 0 comments

Describe the bug
The on_retry_command input, when run, is not using the default or chosen shell from the action inputs. This is causing certain commands to fail

- name: Deploy
  uses: nick-fields/retry@v2.8.3
  with:
    retry_wait_seconds: 1
    max_attempts: 3
    timeout_minutes: 7
    command: |
      exit 1
    on_retry_command: |
      if [[ "foo" == "foo" ]]; then
        echo "result is true"
      fi

Error: /bin/sh: 1: [[: not found

Expected behavior
It should return result is true, and use bash as the shell, not sh

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
Enable debug logging then attach the raw logs (specifically the raw output of this action).

Debug logs: raw-debug-logs.txt