Use overriden composer bin-dir if it exists
Problem/Motivation
A project might have a different bin-dir for its executables (phpcs/phpstan). Check if it exists in the project's composer and use this path for jobs
https://getcomposer.org/doc/06-config.md#bin-dir
Steps to reproduce
Add the following to the composer.json of a project
"config": {
"bin-dir": "custom/path/to/bin"
}Get the following error
sudo: vendor/bin/phpunit: command not found
Proposed resolution
- Change scripts/expand_composer_json.php to check for this [no]
- OR create a symlink to the custom path from ./vendor/bin [no]
- OR create a variable to hold the full path to the custom directory [yes]
Edited by drupalbot