From 51f8bf0914fffd0988e1295a4c58181876d298d9 Mon Sep 17 00:00:00 2001 From: evgeniy Date: Mon, 1 Jan 2024 21:29:10 +0200 Subject: [PATCH] Show a message to the user that they have a failed install --- compose/bin/download | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/compose/bin/download b/compose/bin/download index c8a2c5bf7..d40c84717 100755 --- a/compose/bin/download +++ b/compose/bin/download @@ -3,6 +3,11 @@ VERSION=${1:-2.4.6-p3} EDITION=${2:-community} +# Define ANSI escape codes for colors +YELLOW='\033[0;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + bin/stop bin/start --no-dev @@ -24,5 +29,8 @@ else bin/clinotty composer create-project --repository=https://repo.magento.com/ magento/project-"${EDITION}"-edition="${VERSION}" . fi -bin/clinotty [ ! -f "./var/composer_home/auth.json" ] && bin/clinotty mkdir -p ./var/composer_home && bin/clinotty cp /var/www/.composer/auth.json ./var/composer_home/auth.json - +if [ $? != 0 ]; then + echo -e "${BLUE}Please check the installation guide at ${YELLOW}https://github.com/markshust/docker-magento#install-fails-because-project-directory-is-not-empty${BLUE} for troubleshooting.${NC}" +else + bin/clinotty [ ! -f "./var/composer_home/auth.json" ] && bin/clinotty mkdir -p ./var/composer_home && bin/clinotty cp /var/www/.composer/auth.json ./var/composer_home/auth.json +fi