Skip to content

Commit

Permalink
[1.x] Add sail open command. (#551)
Browse files Browse the repository at this point in the history
* Add `sail open` to open the `APP_URL` on the browser.

* Update sail

* Update sail

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
xiCO2k and taylorotwell authored Feb 15, 2023
1 parent 304e349 commit d988191
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bin/sail
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ function display_help {
echo
echo "${YELLOW}Sharing:${NC}"
echo " ${GREEN}sail share${NC} Share the application publicly via a temporary URL"
echo " ${GREEN}sail open${NC} Open the site in your browser"
echo
echo "${YELLOW}Binaries:${NC}"
echo " ${GREEN}sail bin ...${NC} Run Composer binary scripts from the vendor/bin directory"
Expand Down Expand Up @@ -494,6 +495,18 @@ elif [ "$1" == "share" ]; then
sail_is_not_running
fi

# Open the site...
elif [ "$1" == "open" ]; then
shift 1

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

exit
else
sail_is_not_running
fi

# Pass unknown commands to the "docker-compose" binary...
else
ARGS+=("$@")
Expand Down

0 comments on commit d988191

Please sign in to comment.