Skip to content

Fix wp-env run command handling of special characters#70715

Open
Sukhendu2002 wants to merge 1 commit intoWordPress:trunkfrom
Sukhendu2002:fix/58253-wp-env-run-special-characters
Open

Fix wp-env run command handling of special characters#70715
Sukhendu2002 wants to merge 1 commit intoWordPress:trunkfrom
Sukhendu2002:fix/58253-wp-env-run-special-characters

Conversation

@Sukhendu2002
Copy link
Contributor

What?

Closes: #58253

This PR fixes issue #58253 where wp-env run commands containing special characters (like brackets, quotes, etc.) were failing with exit code 126.

The solution properly escapes special characters and uses sh -c within the Docker container to ensure commands are correctly interpreted, while maintaining the performance improvements introduced in PR #50007 that changed from using docker-compose run to docker-compose exec.

@Sukhendu2002 Sukhendu2002 changed the title git push --set-upstream origin fix/58253-wp-env-run-special-characters Fix wp-env run command handling of special characters Jul 14, 2025
@Sukhendu2002 Sukhendu2002 marked this pull request as ready for review July 15, 2025 04:30
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Sukhendu2002 <sukhendu2002@git.wordpress.org>
Co-authored-by: bgoewert <bgoewert@git.wordpress.org>
Co-authored-by: Luc-cpl <lucascarvalhopl@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Tool] Env /packages/env labels Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Tool] Env /packages/env [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wp-env: run command with double brackets not working

2 participants