From ff6a446ca9074ad4cbdf425dcb1048334ba9858d Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Mon, 12 Mar 2018 14:49:25 +0100 Subject: [PATCH] bootstrap.sh: fix sites subdir when specifying options.uri Drush 9 tries too hard to get the sites subdir from the options.uri setting. This is wrong IMHO because options.uri is something relative to the *web* root and can be subject to web server aliases and whatnot, while sites-dir is something relative to the local filesystem; mixing the two is counter-intuitive, TO be on the safe side, pass the --sites-subdir option explicitly to "drush site-install", to avoid a possible error when options.uri is something valid but not expected by drush, like http://localhost/~user/drupal/web Fix the following error emitted in such cases: [error] Could not determine target sites directory for site to install. Use --sites-subdir to specify. --- libexec/bootstrap.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/bootstrap.sh b/libexec/bootstrap.sh index 9975299..1f3b160 100755 --- a/libexec/bootstrap.sh +++ b/libexec/bootstrap.sh @@ -158,6 +158,7 @@ $DRUSH --verbose --yes \ --db-url="mysql://${DB_USER}:${DB_PASS}@localhost/${DB_NAME}" \ --site-name="$SITE_NAME" \ --site-mail="$SITE_MAIL" \ + --sites-subdir="default" \ --account-name="$ACCOUNT_NAME" \ --account-pass="$ACCOUNT_PASS" \ --account-mail="$ACCOUNT_MAIL" \ -- 2.1.4