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