mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 16:40:05 +01:00
Update valet
This commit is contained in:
12
valet
12
valet
@@ -32,10 +32,15 @@ fi
|
||||
if [[ "$1" = "share" ]]
|
||||
then
|
||||
# Check for parameters to pass through to ngrok (these will start with '-' or '--')
|
||||
PARAMS=${3:-$2}
|
||||
if [[ ${PARAMS:0:1} != '-' ]]; then
|
||||
PARAMS=''
|
||||
PARAMS=(${@:2})
|
||||
for PARAM in ${PARAMS[@]}
|
||||
do
|
||||
if [[ ${PARAM:0:1} != '-' ]]; then
|
||||
PARAMS=("${PARAMS[@]/$PARAM}") #Quotes when working with strings
|
||||
fi
|
||||
done
|
||||
|
||||
PARAMS=${PARAMS[@]}
|
||||
|
||||
HOST="${PWD##*/}"
|
||||
|
||||
@@ -72,6 +77,7 @@ then
|
||||
|
||||
# Fetch Ngrok URL In Background...
|
||||
bash "$DIR/cli/scripts/fetch-share-url.sh" "$HOST" &
|
||||
|
||||
sudo -u "$(logname)" "$DIR/bin/ngrok" http "$HOST.$TLD:$PORT" -host-header=rewrite $PARAMS
|
||||
exit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user