Describe the bug
It looks like @actions/exec.exec escapes commands and pipes are not working because of this
To Reproduce
Steps to reproduce the behavior:
@actions/exec to project - npm i -s @actions/exececho "Hello world" | grep "o"Hello world" | grep "o", instead of Hell**o** w**o**rld (asterisks here are only for visual purpose, i do not expect them to be in log)
Expected behavior
Have an option to disable escaping
Screenshots

Desktop (please complete the following information):
@Kerizer I have the same problem, the command I want to run is yes | sdkmanager --licenses to automatically accept all prompts with yes. This does not work, it takes | sdkmanager --licenses as one argument and prints that forever until I cancel the workflow.
A workaround I found is to use /bin/bash -c "my command" , e.g. /bin/bash -c "yes | sdkmanager --licenses". That worked for me.
As I just found out, this also affects chaining commands with &&...
@hrueger Thanks a lot for the workaround. For future reference here is the windows equivalent:
WINDOWS:
exec.exec(`cmd /c "my command"`)
Closing as a dupe of https://github.com/actions/toolkit/issues/346
Most helpful comment
@Kerizer I have the same problem, the command I want to run is
yes | sdkmanager --licensesto automatically accept all prompts withyes. This does not work, it takes| sdkmanager --licensesas one argument and prints that forever until I cancel the workflow.A workaround I found is to use
/bin/bash -c "my command", e.g./bin/bash -c "yes | sdkmanager --licenses". That worked for me.