php-parallel-lint / PHP-Parallel-Lint

This tool check syntax of PHP files faster than serial check with fancier output.
Other
287 stars 21 forks source link

Escape spaces in PHP binary path #149

Closed azatakmyradov closed 6 months ago

azatakmyradov commented 1 year ago

This PR escapes spaces in binary path.

When you have space in your PHP binary path (Ex: /**/Library/Application Support/Herd/bin/php82'). I get an error output:

Unable to execute '/Users/user/Library/Application Support/Herd/bin/php82'.
jrfnl commented 1 year ago

@azatakmyradov I suggest you have a read through the discussion in response to this PR and then revisit your patch.

azatakmyradov commented 1 year ago

@jrfnl sorry I didn't see that PR. I used escapeshellcmd to escape the string and ^ or \ for spaces depending on the os. I also extracted it to a seperate function so I can write tests for it.

glensc commented 11 months ago

maybe worth checking out and having some thoughts: