Skip to content

Instantly share code, notes, and snippets.

@nevergone
Created October 24, 2020 10:31
Show Gist options
  • Save nevergone/d0df33718a5f5d508591cd433cc9623e to your computer and use it in GitHub Desktop.
Save nevergone/d0df33718a5f5d508591cd433cc9623e to your computer and use it in GitHub Desktop.
Drush 7.x - DRUSH_OPTIONS_URI__variable.patch
diff --git a/includes/preflight.inc b/includes/preflight.inc
index e0812372c..de3646dc2 100644
--- a/includes/preflight.inc
+++ b/includes/preflight.inc
@@ -394,6 +394,9 @@ function _drush_preflight_root_uri() {
*/
function _drush_preflight_uri() {
$uri = drush_get_option('uri', '');
+ if (empty($uri) && getenv('DRUSH_OPTIONS_URI')) {
+ $uri = getenv('DRUSH_OPTIONS_URI');
+ }
drush_set_context('DRUSH_SELECTED_URI', $uri);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment