Skip to content

Commit

Permalink
Only check for the presence of the PHPCS binary it doesnt need to exe…
Browse files Browse the repository at this point in the history
…cutable
  • Loading branch information
bordoni committed Sep 21, 2023
1 parent 6b6ad46 commit fcdc5ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/class-phpcs.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function clear_cache() {
* @return string|WP_Error|null
*/
public function run( $path, array $args = array() ) {
if ( ! is_executable( $this->phpcs ) ) {
if ( ! file_exists( $this->phpcs ) ) {
return new \WP_Error(
'missing_dependency',
'PHP Code Sniffer is not available. Try running <code>composer install</code> first.'
Expand Down

0 comments on commit fcdc5ec

Please sign in to comment.