Command not working as expected #26188
-
I am trying to install and use the
At the bottom of this post is a minimal working example yaml block. The command does not error out when running
in the action but does not work with any other combination of arguments. I do not experience any errors locally on my machine, so I do not think it is misuse of the command. Am I doing something wrong? I’ve spent a day and a half on this now, and no luck. I have no idea why this isn’t working, as the built in linux commands work fine. Apologies if the answer is simple. Thanks in advance.
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Thank you for reaching this out! I can reproduce the same with ‘ag’ command. I have raised an internal ticket to github. I will update once there’s an update. |
Beta Was this translation helpful? Give feedback.
-
Hi @blaketeres , It appears that ag will return 0 if it can find the string and 1 if it can’t. A nonzero exit code will cause the step to fail. You can set ‘continue-on-error: true’ in the step if this behavior isn’t desired: https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error Thanks. |
Beta Was this translation helpful? Give feedback.
-
Yes, that makes sense. However,
This |
Beta Was this translation helpful? Give feedback.
-
Hi @blaketeres , You can add ‘exit 0’ at the end of the ag command, it works on my side. Code sample as below:
Thanks. |
Beta Was this translation helpful? Give feedback.
Hi @blaketeres ,
You can add ‘exit 0’ at the end of the ag command, it works on my side. Code sample as below:
Thanks.