Skip to content

Conversation

@TimWolla
Copy link
Member

This quoting is not necessary and in fact actively harmful, because the ./configure command is not passed to a shell as a string where word-splitting happens, but as an argv array which the process will use as-is.

As an example, previously providing the --with-library=/tmp/foo flag would result in the --with-library='/tmp/foo' flag being passed as the argument, which then would be interpreted as if "--with-library='/tmp/foo'" was entered into a shell. In other words: The library was expected to be found in a directory literally starting with a single-quote.

This quoting is not necessary and in fact actively harmful, because the
`./configure` command is not passed to a shell as a string where word-splitting
happens, but as an argv array which the process will use as-is.

As an example, previously providing the `--with-library=/tmp/foo` flag would
result in the `--with-library='/tmp/foo'` flag being passed as the argument,
which then would be interpreted as if `"--with-library='/tmp/foo'"` was entered
into a shell. In other words: The library was expected to be found in a
directory literally starting with a single-quote.
@asgrim asgrim self-assigned this Nov 15, 2024
@asgrim asgrim added the bug Something isn't working label Nov 15, 2024
@asgrim asgrim added this to the 0.2.0 milestone Nov 15, 2024
@asgrim asgrim merged commit 929c775 into php:main Nov 15, 2024
19 checks passed
@asgrim
Copy link
Collaborator

asgrim commented Nov 15, 2024

Thanks @TimWolla !

@TimWolla TimWolla deleted the configure-flag-quoting branch November 15, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants