Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint sail script #656

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions bin/sail
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ else
fi

# Source the ".env" file so Laravel's environment variables are available...
if [ ! -z "$APP_ENV" ] && [ -f ./.env.$APP_ENV ]; then
source ./.env.$APP_ENV;
# shellcheck source=/dev/null
if [ -n "$APP_ENV" ] && [ -f ./.env."$APP_ENV" ]; then
source ./.env."$APP_ENV";
elif [ -f ./.env ]; then
source ./.env;
fi
Expand Down Expand Up @@ -159,8 +160,7 @@ function sail_is_not_running {
}

# Define Docker Compose command prefix...
docker compose &> /dev/null
if [ $? == 0 ]; then
if docker compose &> /dev/null; then
DOCKER_COMPOSE=(docker compose)
else
DOCKER_COMPOSE=(docker-compose)
Expand Down Expand Up @@ -560,7 +560,7 @@ elif [ "$1" == "open" ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
open $APP_URL
open "$APP_URL"

exit
else
Expand Down