Skip to content

Commit c1c8511

Browse files
Lint sail script (#656)
1 parent 988961f commit c1c8511

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bin/sail

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ else
128128
fi
129129

130130
# Source the ".env" file so Laravel's environment variables are available...
131-
if [ ! -z "$APP_ENV" ] && [ -f ./.env.$APP_ENV ]; then
132-
source ./.env.$APP_ENV;
131+
# shellcheck source=/dev/null
132+
if [ -n "$APP_ENV" ] && [ -f ./.env."$APP_ENV" ]; then
133+
source ./.env."$APP_ENV";
133134
elif [ -f ./.env ]; then
134135
source ./.env;
135136
fi
@@ -159,8 +160,7 @@ function sail_is_not_running {
159160
}
160161

161162
# Define Docker Compose command prefix...
162-
docker compose &> /dev/null
163-
if [ $? == 0 ]; then
163+
if docker compose &> /dev/null; then
164164
DOCKER_COMPOSE=(docker compose)
165165
else
166166
DOCKER_COMPOSE=(docker-compose)
@@ -560,7 +560,7 @@ elif [ "$1" == "open" ]; then
560560
shift 1
561561

562562
if [ "$EXEC" == "yes" ]; then
563-
open $APP_URL
563+
open "$APP_URL"
564564

565565
exit
566566
else

0 commit comments

Comments
 (0)