Friday, March 1, 2019

Drupal 8 Composer failure on Windows 7 with the message "bin\phpcs" "--config-show" "installed_paths"" failed.

Drupal 8 Composer failure with the below message on Windows 7:

 ""D:\www\mydrupalsite/vendor/bin\phpcs" "--config-show" "installed_paths"" failed.

Solution: 

Save this as phpcs.bat inside D:\www\vendor\bin:

@ECHO OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/../squizlabs/php_codesniffer/bin/phpcs
php "%BIN_TARGET%" %*

No comments: