You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows it is possible to use / directory separator instead of \ to run a command inside CLI. But to be able to run such a command the path needs to be quoted.
Can you provide a reproducer test that we could add to the test suite?
The linked commit is applicable to non-Windiws OSes so that's really strange that you found it to have introduced the issue...
@nicolas-grekas You're right. I missed the last return inside the Windows condition and the ProcessUtils::escapeArgument is actually not used anymore since SF 3.3. That's the problem. OK, I'll send a PR in few minutes.
…indows (maryo)
This PR was squashed before being merged into the 3.3-dev branch (closes#22551).
Discussion
----------
[Process] Ecaping of CLI arguments containing slashes on Windows
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22549
| License | MIT
Actually only the first argument - the command needs to be escaped but that would need another condition. I think it should be OK.
Commits
-------
0d07312 [Process] Ecaping of CLI arguments containing slashes on Windows
On Windows it is possible to use
/
directory separator instead of\
to run a command inside CLI. But to be able to run such a command the path needs to be quoted.I am using SF 3.3 now but I guess this commit caused the BC break which is merged to many versions.
3779f3f#diff-bfb5d7f8e7485d053a135b3692e8a0ca
Thus also the example in this test is not correct. It would not work on Windows.
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Process/Tests/ProcessBuilderTest.php#L94
The text was updated successfully, but these errors were encountered: