0

I try to get drush to run by calling just 'drush' and not 'vendor/bin/drush', I'm working with OSX Sierra. This doesn't work out as I want hope someone can help me with this.

When i follow the instructions here: http://docs.drush.org/en/master/install/

When at point 3: If you want the convenience of calling drush instead of ../vendor/bin/drush, copy the examples/drush.wrapper file to your Drupal root and modify to taste.

I get stuck. I copy the drush.wrapper file to my root and rename it to drush . Then I edit the path to:

cd "`dirname $0`"
vendor/bin/drush.launcher --local "$@"

Because I'm in the root I removed the ../ before vendor. When I save all I stil get:

bash: drush: command not found

When I try going to: vendor/bin/drush.launcher it runs perfectly. What am I doing wrong?

  • Which OS you are using? – mujuonly May 1 '17 at 9:07
  • I'm working on OSX Sierra – Joost May 1 '17 at 9:11
  • A bit of a workaround... but have you considered just pointing drush to that folder form within your drushrc file? Or even just making a bash alias?docs.drush.org/en/7.x/configure – Shawn Matthews May 1 '17 at 17:24
0

This isn't really a Drupal or Drush question, but a Bash/shell question: How to run a script in the current directory?

  1. The script must be executable: chmod u+x drush
  2. The script must be in the (executable) path. Since it's not recommended to have the current directory in the path (for very good security reasons), the solutions is to call Drush as ./drush instead of just drush.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.