Closed kozer closed 1 week ago
I managed to set up a Linux instance and test this PR. I tested different commands both with the app running and without and worked as expected 🎊 . However, I noticed that running the CLI command wp, i.e. without any command results in an error:
What is supposed to do in that case @fluiddot ?
@fluiddot , I updated the script as it seems that the %q format specifier is not available in all versions of printf
It works now, but please take a look of it in MacOSX as well ( and do a final check on linux )
UPDATE: For some reason, lint fails, but running npm run lint
locally, doesn't produce any errors. Can you please also check on mac os as well?
What is supposed to do in that case @fluiddot ?
wp
should do the same as the command wp help
.
What is supposed to do in that case @fluiddot ?
wp
should do the same as the commandwp help
.
Yeah, I realized it after the first question, and I fixed it :smile:
UPDATE: For some reason, lint fails, but running
npm run lint
locally, doesn't produce any errors. Can you please also check on mac os as well?
Based on the output from CI:
curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)
Seems it might be a one-off failure, so retrying the jobs should work.
@fluiddot , I updated the script as it seems that the %q format specifier is not available in all versions of
printf
It works now, but please take a look of it in MacOSX as well ( and do a final check on linux )
Great, thanks! I've reviewed this on both macOS and Linux and worked as expected.
For reference, the processing of the arguments (i.e. command printf '%q ' "$@"
) was needed for invoking commands with quotes like:
wp eval 'echo WP_CONTENT_DIR;'
wp eval 'echo rand();'
Related to https://github.com/Automattic/dotcom-forge/issues/7327
Proposed Changes
This PR fixes wp-cli execution for linux
Testing Instructions
Pre-merge Checklist