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.
--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" \