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
Support multiline command #10
Comments
I think this is an issue on windows only... on linux and mac this works for me: - name: Foo
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 3
command: |
command_1 \
command_1_continued
command_2 Apparently on windows it is using |
Probably not relevant, but inside the log, the commands are not aligned properly
|
I found a workaround! This works properly: - name: Foo
if: runner.os == 'Windows'
uses: nick-invision/retry@v2.2.0
with:
timeout_minutes: 10
retry_wait_seconds: 1
max_attempts: 3
command: >-
echo "this is command 1" &
echo "this is command 2" It is definitely something related to the end of lines, Also unfortunately empty lines are not accepted (i changed them to "echo &") The result is ugly but it works. |
Thanks @drdanz , BTW maybe you have some plan to allow configure she'll also? P.S. this can be useful for *nix also because python she'll available there |
@drdanz @CAMOBAP Could I get a few specific examples where multiline is not working as expected? I'm testing this now using the following and not able to reproduce the issue: - name: Multiline, multi command
uses: ./
with:
timeout_minutes: 1
max_attempts: 1
command: |
echo "abc"
echo "123"
- name: Multiline single command
uses: ./
with:
timeout_minutes: 1
max_attempts: 1
command: >-
echo "abc
123"
I believe this to be correct because GitHub syntax for multiline commands begin with |
@nick-invision thanks for the update, if it work now probably the issue wasn't related to this action. My example was as simple as yours, so I think we can close this one P.S. Any plans to add support for different 'shell'? |
Alternate shell support has been added to v2. 3.0. See Readme or related issue #28 comments for examples. |
@nick-invision awesome, thanks for the comment |
Can you add this as an example in the documentation? Thanks. |
It looks like multiline command doesn't work
Is there any plan to support it
The text was updated successfully, but these errors were encountered: