Download the PHP package webflo/drush-shim without Composer
On this page you can find all versions of the php package webflo/drush-shim. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webflo/drush-shim
More information about webflo/drush-shim
Files in webflo/drush-shim
Package drush-shim
Short Description Provides a drush executable for your global PATH
License GPL-2.0-or-later
Informations about the package drush-shim
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.
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
.
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.
Installation - Phar
-
Download latest stable release via CLI (code below) or browse to https://github.com/drush-ops/drush-launcher/releases/latest.
OSX:
Linux:
- Make downloaded file executable:
chmod +x drush.phar
-
Move drush.phar to a location listed in your
$PATH
, rename todrush
: - 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 withphp
:
Update
The Drush Launcher Phar is able to self update to the latest release.
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.
export DRUSH_LAUNCHER_FALLBACK=/path/to/drush
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]
License
GPL-2.0+
All versions of drush-shim with dependencies
webmozart/path-util Version ^2.3
composer/xdebug-handler Version ^1.0
laravel-zero/phar-updater Version ^1.1