Unable to run exec command due to --no-interaction flag
Closed this issue · 4 comments
Greetings!
I'm trying to run the following wp-cli command:
- name: Install composer dependencies and generate pot file
uses: php-actions/composer@v5
with:
command: exec wp i18n make-pot ${{github.workspace}} ${{github.workspace}}/languages/give.pot
The command fails, however, as the --no-interaction flag:
Command: composer exec wp i18n make-pot /home/runner/work/givewp/givewp /home/runner/work/givewp/givewp/languages/give.pot --no-interaction
Error: Process completed with exit code 1.
I suspect the assumption is that the command is a native composer command, and not the exec command. So an exception probably needs to be made for the exec command to not add any additional flags.
Thanks for reporting this, I'll take a look later.
My plan is to recreate your requirements in https://GitHub.com/php-actions/example-composer so I can use that repository as future documented proof of the feature working.
Maybe your requirements would be satisfied by the only_args
input or by toggling the interaction
Boolean?
I actually ended up realizing I need to run more than one wp-cli command, so I broke out into its own step. I'm afraid that I didn't test the only_args
option, but that looks like it would've done the trick. Feel free to close this if you feel it's resolved.
If you have any follow up questions, I'm happy to answer. Have fun!