class RedispatchToSiteLocal (View source)

RedispatchToSiteLocal forces an exec to the site-local Drush if it exist. We must do this super-early, before loading Drupal's autoload file. If we do not, we will crash unless the site-local Drush and the global Drush are using the exact same versions of all dependencies, which will rarely line up sufficiently to prevent problems.

Methods

static bool
redispatchIfSiteLocalDrush(array $argv, string $root, string $vendor, PreflightLog $preflightLog)

Determine if a local redispatch is needed, and do so if it is.

static 
findSiteLocalDrush(string $root)

Find a site-local Drush, if there is one in the selected site's vendor directory.

Details

static bool redispatchIfSiteLocalDrush(array $argv, string $root, string $vendor, PreflightLog $preflightLog)

Determine if a local redispatch is needed, and do so if it is.

Parameters

array $argv The commandline arguments
string $root The selected site root or false if none
string $vendor The path to the vendor directory
PreflightLog $preflightLog A basic logger.

Return Value

bool True if redispatch occurred, and was returned successfully.

static protected findSiteLocalDrush(string $root)

Find a site-local Drush, if there is one in the selected site's vendor directory.

Parameters

string $root The selected site root