Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On multi-line, multi-command scripts, it won't fail unless the last command fails #53

Open
escudero89 opened this issue Jan 18, 2022 · 0 comments
Assignees

Comments

@escudero89
Copy link

escudero89 commented Jan 18, 2022

Describe the bug

The first one works, the second one doesn't:

            - name: test1
              uses: nick-invision/retry@v2
              with:
                  timeout_minutes: 20 
                  max_attempts: 3
                  command: |
                      echo 'works'
                      pkgx12
                      echo 'works'
        
            - name: test2
              uses: nick-invision/retry@v2
              with:
                  timeout_minutes: 20
                  max_attempts: 3
                  command: |
                      echo 'works'
                      pkgx12 && echo 'works'

Expected behavior

Both should fail, or clarify such thing in the README.

Screenshots

image

Logs

2022-01-18T14:08:39.5054436Z ##[group]Run nick-invision/retry@v2
2022-01-18T14:08:39.5054733Z with:
2022-01-18T14:08:39.5054946Z   timeout_minutes: 20
2022-01-18T14:08:39.5055173Z   max_attempts: 3
2022-01-18T14:08:39.5055411Z   command: echo 'works'
pkgx12
echo 'works'

2022-01-18T14:08:39.5055672Z   retry_wait_seconds: 10
2022-01-18T14:08:39.5055914Z   polling_interval_seconds: 1
2022-01-18T14:08:39.5056144Z   warning_on_retry: true
2022-01-18T14:08:39.5056373Z   continue_on_error: false
2022-01-18T14:08:39.5056613Z ##[endgroup]
2022-01-18T14:08:39.6687396Z 
2022-01-18T14:08:39.6755118Z works
2022-01-18T14:08:39.6756988Z bash: line 1: pkgx12: command not found
2022-01-18T14:08:39.6758088Z works
2022-01-18T14:08:40.6753720Z Command completed after 1 attempt(s).
2022-01-18T14:08:40.6753983Z 
2022-01-18T14:08:40.6872658Z ##[group]Run nick-invision/retry@v2
2022-01-18T14:08:40.6872893Z with:
2022-01-18T14:08:40.6873096Z   timeout_minutes: 20
2022-01-18T14:08:40.6873312Z   max_attempts: 3
2022-01-18T14:08:40.6873560Z   command: echo 'works'
pkgx12 && echo 'works'

2022-01-18T14:08:40.6873799Z   retry_wait_seconds: 10
2022-01-18T14:08:40.6874032Z   polling_interval_seconds: 1
2022-01-18T14:08:40.6874272Z   warning_on_retry: true
2022-01-18T14:08:40.6874481Z   continue_on_error: false
2022-01-18T14:08:40.6874696Z ##[endgroup]
2022-01-18T14:08:40.7195864Z 
2022-01-18T14:08:40.7278695Z works
2022-01-18T14:08:40.7287107Z bash: line 1: pkgx12: command not found
2022-01-18T14:08:51.7328878Z ##[warning]Attempt 1 failed. Reason: Child_process exited with error code 127
2022-01-18T14:08:51.7337314Z 
2022-01-18T14:08:51.7339078Z works
2022-01-18T14:08:51.7344252Z bash: line 1: pkgx12: command not found
2022-01-18T14:09:02.7445366Z ##[warning]Attempt 2 failed. Reason: Child_process exited with error code 127
2022-01-18T14:09:02.7446598Z 
2022-01-18T14:09:02.7480505Z works
2022-01-18T14:09:02.7485492Z bash: line 1: pkgx12: command not found
2022-01-18T14:09:13.7544966Z ##[error]Final attempt failed. Child_process exited with error code 127
2022-01-18T14:09:13.7545802Z 
2022-01-18T14:09:13.7546558Z 
2022-01-18T14:09:13.7810761Z Evaluate and set job outputs
2022-01-18T14:09:13.7823667Z Cleaning up orphan processes

(they are simple raw logs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants