Skip to content

Commit 533d0ad

Browse files
devjackdriesvintstaylorotwell
authored
Adds a check and error for APP_SERVICE being accurate. (#258)
* Adds a check and error for APP_SERVICE being accurate. * Update sail * Update sail Co-authored-by: Dries Vints <dries@vints.io> Co-authored-by: Taylor Otwell <taylor@laravel.com>
1 parent 80f6cd9 commit 533d0ad

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/sail

+6
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ if [ -z "$SAIL_SKIP_CHECKS" ]; then
7070
else
7171
EXEC="no"
7272
fi
73+
74+
if [[ $(docker-compose ps --services) != *"$APP_SERVICE"* ]]; then
75+
echo -e "${WHITE}The \"$APP_SERVICE\" service is not running. Ensure the \$APP_SERVICE environment variable exists and corresponds to a named, running service in your docker-compose.yml file.${NC}" >&2
76+
77+
exit 1
78+
fi
7379
else
7480
EXEC="yes"
7581
fi

0 commit comments

Comments
 (0)