From 669a616fa3e9d91e1b27cb106693ce168e66491c Mon Sep 17 00:00:00 2001 From: Moshe Weitzman Date: Mon, 7 May 2018 09:16:36 -0400 Subject: [PATCH] Fix #2285, #2268. Recognize current working dir for multisites when bootstrapping a site. Affects hosts that have pcntl_exec(). --- includes/startup.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/startup.inc b/includes/startup.inc index ea3a4b11f3..5daedead92 100644 --- a/includes/startup.inc +++ b/includes/startup.inc @@ -414,6 +414,9 @@ function drush_startup($argv) { // Get the current environment for pnctl_exec. $env = drush_env(); + // Make sure Drush can locates original working directory. https://github.com/drush-ops/drush/issues/2285 + chdir($cwd); + // Launch the new script in the same process. // If the launch succeeds, then it will not return. $error = pcntl_exec($found_script, $arguments, $env);