diff --git a/bin/sail b/bin/sail index 1dcf054a..35ea341b 100755 --- a/bin/sail +++ b/bin/sail @@ -1,5 +1,4 @@ #!/usr/bin/env bash - UNAMEOUT="$(uname -s)" WHITE='\033[1;37m' @@ -18,6 +17,11 @@ if [ "$MACHINE" == "UNKNOWN" ]; then exit 1 fi +# Source the ".env" file so Laravel's environment variables are available... +if [ -f ./.env ]; then + source ./.env +fi + # Define environment variables... export APP_PORT=${APP_PORT:-80} export APP_SERVICE=${APP_SERVICE:-"laravel.test"} @@ -61,10 +65,7 @@ function sail_is_not_running { } if [ $# -gt 0 ]; then - # Source the ".env" file so Laravel's environment variables are available... - if [ -f ./.env ]; then - source ./.env - fi + # Proxy PHP commands to the "php" binary on the application container... if [ "$1" == "php" ]; then