From 5294dda9a668ebc3f6697685f0009a157410ddd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Ara=C3=B1a?= Date: Mon, 18 Nov 2024 17:51:51 +0100 Subject: [PATCH] setup command: Defer drush call after composer install --- commands/host/setup | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/host/setup b/commands/host/setup index 7311c69..dc794b4 100755 --- a/commands/host/setup +++ b/commands/host/setup @@ -49,7 +49,7 @@ handle_options() { while [ $# -gt 0 ]; do case $1 in -a | --all) - mapfile -t SITES < <(drush site:alias --fields=name --format=list --filter=.local | sed 's/@//' | sed 's/.local//') + SITES=all shift ;; -h | --help) @@ -128,6 +128,9 @@ fi # Try to install sites if not --no-install is given if [ "$NO_INSTALL" -eq 0 ]; then + if [ "$SITES" == "all" ]; then + mapfile -t SITES < <(ddev drush site:alias --fields=name --format=list --filter=.local | sed 's/@//' | sed 's/.local//') + fi for SITE in "${SITES[@]}"; do echo echo -e "\033[32mInstalling site: ${SITE} \033[0m\n"