Fix proc_open_compat util on Windows by lipemat · Pull Request #5689 · wp-cli/wp-cli

@lipemat

Wrapping the commands in double quotes conflicts with various flags also using double quotes. 

For example when running `db export` you get.

`Warning: Failed to get current character set of the posts table. Reason: '"mysql --no-defaults --no-auto-rehash --batch --skip-column-names --host="localhost" --user="mat" --default-ch
aracter-set="utf8" --execute="SELECT' is not recognized as an internal or external command,
operable program or batch file.`

Removing the quotes resolves the issue.

This was referenced

Oct 14, 2022

danielbachhuber

@danielbachhuber danielbachhuber changed the title Fix proc_open commands on Windows Fix proc_open_compat util on Windows

Oct 28, 2022

@lipemat lipemat deleted the fix-windows-commands branch

February 24, 2023 06:16

This was referenced

Mar 10, 2026