From: Antonio Ospite Date: Mon, 12 Mar 2018 13:49:25 +0000 (+0100) Subject: bootstrap.sh: fix sites subdir when specifying options.uri X-Git-Tag: v0.1.2~10 X-Git-Url: https://git.ao2.it/drupal-init-tools.git/commitdiff_plain/ff6a446ca9074ad4cbdf425dcb1048334ba9858d?ds=inline 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. --- 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" \