Skip to content

Commit

Permalink
Fix open in browser with APP_PORT (#663)
Browse files Browse the repository at this point in the history
* Fix open in browser with APP_PORT

* Update sail

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
ijpatricio and taylorotwell authored Feb 8, 2024
1 parent b744445 commit 3047e1a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bin/sail
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,14 @@ elif [ "$1" == "open" ]; then
shift 1

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

if [[ -n "$APP_PORT" && "$APP_PORT" != "80" ]]; then
FULL_URL="${APP_URL}:${APP_PORT}"
else
FULL_URL="$APP_URL"
fi

open "$FULL_URL"

exit
else
Expand Down

0 comments on commit 3047e1a

Please sign in to comment.