-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
If there is a space character in the path to the PHP_BINARY, phpcs-diff will fail.
Presumably other unescaped but valid path characters would have the same effect.
Path to the PHP_BINARY in my environment (macOS)...
'/Users/user_name/Library/Application Support/Local/lightning-services/php-8.0.30+0/bin/darwin-arm64/bin/php'The phpcs-diff failure looks like this...
$ ./vendor/bin/phpcs-diff master
sh: /Users/user_name/Library/Application: No such file or directory
Unable to run phpcs executable.
I am able to resolve this for my environment by using escapeshellarg on PHP_BINARY at line 220 of \PhpcsDiff\PhpcsDiff::runPhpcs() like so...
$exec = escapeshellarg( PHP_BINARY ) . ' ' . $exec;Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers