We have 3 devs working on a Drupal 7 site. Drush 8 is provided via a local composer file
drush.wrapper exists in the project root containing:
cd "`dirname $0`" DRUSH_ALIAS_FILE="./drush/MYPROJECT.aliases.drushrc.php" DRUSH_LAUNCHER="./vendor/bin/drush.launcher" if [ ! -f $DRUSH_ALIAS_FILE ]; then echo "No Drush alias file was found at ./drush/MYPROJECT.aliases.drushrc.php" exit; fi if [ ! -f $DRUSH_LAUNCHER ]; then echo "Drush Launcher was not found at ./vendor/bin/drush.launcher. Have you ran 'composer install' from the project root?" exit; fi $DRUSH_LAUNCHER --local --alias-path=./drush "$@"
This works for everyone; except the one user on Windows. They get an error along the lines of "drush.php was not found". If he removes the file, drush works (but then it is using the globally installed drush). This of course would break it for everyone else.
I am confused by the docs. How does one properly supply Drush 8 with a Drupal 7 project via Composer and have 'drush' work as a command from the project? I see issues saying the wrapper file is not needed anymore and other posts saying you need one.
edit: We started over and installed drush launcher per the documentation with the Windows .bat file. It still gives the error:
"Could not open input file /usr/local/bin/drush"