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

[1.x] Add sail open command. #551

Merged
merged 3 commits into from
Feb 15, 2023
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
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