2017 © Pedro Peláez
 

library drush-shim

Provides a drush executable for your global PATH

image

webflo/drush-shim

Provides a drush executable for your global PATH

  • Friday, August 4, 2017
  • by webflo
  • Repository
  • 4 Watchers
  • 26 Stars
  • 3,309 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 5 Open issues
  • 16 Versions
  • 2 % Grown

The README.md

Alternatives now that this project is archived.

Add ./vendor/bin to the front of your $PATH. This relative path works for any Drupal codebase on your system if you run commands from the project root. And it is harmless otherwise. Other options include direnv, fd, or the scripts in this issue., (*1)

Description

In order to avoid dependency issues, it is best to require Drush on a per-project basis via Composer (composer require drush/drush). This makes Drush available to your project by placing it at vendor/bin/drush., (*2)

However, it is inconvenient to type vendor/bin/drush in order to execute Drush commands. By installing the drush launcher globally on your local machine, you can simply type drush on the command line, and the launcher will find and execute the project specific version of drush located in your project's vendor directory., (*3)

Installation - Phar

  1. Download latest stable release via CLI (code below) or browse to https://github.com/drush-ops/drush-launcher/releases/latest., (*4)

    OSX:, (*5)

    curl -OL https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar
    

    Linux:, (*6)

    wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar
    
  2. Make downloaded file executable: chmod +x drush.phar
  3. Move drush.phar to a location listed in your $PATH, rename to drush:, (*7)

    sudo mv drush.phar /usr/local/bin/drush
    
  4. Windows users: create a drush.bat file in the same folder as drush.phar with the following lines. This gets around the problem where Windows does not know that the drush file is associated with php:, (*8)

    Bat @echo off php "%~dp0\drush" %*, (*9)

Update

The Drush Launcher Phar is able to self update to the latest release., (*10)

    drush self-update

Fallback

When a site-local Drush is not found, this launcher usually throws a helpful error. You may avoid the error and instead hand off execution to a global Drush (any version) by exporting an environment variable., (*11)

export DRUSH_LAUNCHER_FALLBACK=/path/to/drush, (*12)

Xdebug compatibility

Drush Launcher, like Composer automatically disables Xdebug by default. This improves performance substantially. You may override this feature by setting an environment variable. DRUSH_ALLOW_XDEBUG=1 drush [command], (*13)

License

GPL-2.0+, (*14)

The Versions

04/08 2017

dev-master

9999999-dev

Provides a drush executable for your global PATH

  Sources   Download

GPL-2.0+

The Requires

 

by Florian Weber

03/08 2017

0.2.7

0.2.7.0

Provides a drush executable for your global PATH

  Sources   Download

GPL-2.0+

The Requires

 

by Florian Weber

27/07 2017

0.2.6

0.2.6.0

Provides a drush executable for your global PATH

  Sources   Download

GPL-2.0+

The Requires

 

by Florian Weber

25/07 2017

0.2.5

0.2.5.0

Provides a drush executable for your global PATH

  Sources   Download

GPL-2.0+

The Requires

 

by Florian Weber

23/07 2017

0.2.4

0.2.4.0

Provides a drush executable for your global PATH

  Sources   Download

GPL-2.0+

The Requires

 

by Florian Weber

23/07 2017

0.2.3

0.2.3.0

Provides a drush executable for your global PATH

  Sources   Download

GPL-2.0+

The Requires

 

by Florian Weber

20/06 2017

0.2.2

0.2.2.0

Provides a drush executable for your global PATH

  Sources   Download

GPL-2.0+

The Requires

 

by Florian Weber

20/06 2017

0.2.1

0.2.1.0

Provides a drush executable for your global PATH

  Sources   Download

GPL-2.0+

The Requires

 

by Florian Weber

20/06 2017

0.2.0

0.2.0.0

Provides a drush executable for your global PATH

  Sources   Download

GPL-2.0+

The Requires

 

by Florian Weber

19/04 2017

0.1.0

0.1.0.0

Provides a drush executable for your global PATH

  Sources   Download

GPL-2.0+

The Requires

 

by Florian Weber

19/04 2017

0.0.6

0.0.6.0

Provides a drush executable for your global PATH

  Sources   Download

The Requires

 

by Florian Weber

28/01 2017

0.0.5

0.0.5.0

Provides a drush executable for your global PATH

  Sources   Download

The Requires

 

by Florian Weber

19/12 2016

0.0.4

0.0.4.0

Provides a drush executable for your global PATH

  Sources   Download

The Requires

 

by Florian Weber

26/11 2016

0.0.3

0.0.3.0

Provides a drush executable for your global PATH

  Sources   Download

The Requires

 

by Florian Weber

07/10 2016

0.0.2

0.0.2.0

Provides a drush executable for your global PATH

  Sources   Download

The Requires

 

by Florian Weber

07/10 2016

0.0.1

0.0.1.0

Provides a drush executable for your global PATH

  Sources   Download

The Requires

 

by Florian Weber