-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update 'open' to use custom Valet TLD
- Loading branch information
1 parent
a5fbbd1
commit e5c8ff3
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ do | |
echo "-e, --editor EDITOR specify an editor to run 'EDITOR .' with after" | ||
echo "-m, --message \"message\" customize the initial commit message" | ||
echo "-p, --path PATH customize the path in which the new project will be created" | ||
echo "-d, --develop use Composer to install on the develop branch" | ||
echo "-d, --develop use Composer to install on the develop branch" | ||
quit | ||
;; | ||
-p|--path) | ||
|
@@ -109,7 +109,9 @@ sed -i '' "/DB_DATABASE/s/homestead/$PROJECTNAME/" .env | |
sed -i '' '/DB_USERNAME/s/homestead/root/' .env | ||
sed -i '' '/DB_PASSWORD/s/secret//' .env | ||
|
||
open "http://$PROJECTNAME.dev" | ||
# Open the domain using the Valet-specified TLD; avoids requiring sudo | ||
# with `valet open` | ||
php -r "\$tld=json_decode(file_get_contents('$HOME/.valet/config.json'), true)['domain']; echo 'http://$PROJECTNAME.' . \$tld;" | xargs open | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mattstauffer
via email
Author
Member
|
||
|
||
# @todo: Can we make this work with a ternary style assignment instead? | ||
if [ $PROJECTPATH == "." ] | ||
|
Scary, I know. Still trying to figure out why
valet open
requires sudo some times.