1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 16:40:05 +01:00

Update valet

This commit is contained in:
comes
2019-12-21 21:00:52 +01:00
committed by GitHub
parent 9b1c58591d
commit 979826887c

14
valet
View File

@@ -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=''
fi
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