File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 5050 if [[ $SHARETOOL = " ngrok" ]]
5151 then
5252 # ngrok
53+ # Check to make sure ngrok is configured correctly
54+ BREW_PREFIX=$( brew --prefix)
55+ $( $BREW_PREFIX /bin/ngrok config check > /dev/null 2>&1 )
56+
57+ if [[ $? -ne 0 ]]; then
58+ echo " Please sign up for a free ngrok account and then run valet set-ngrok-token {yourTokenHere}."
59+ exit
60+ fi
61+
5362 # Check for parameters to pass through to ngrok (these will start with '-' or '--')
5463 PARAMS=(${@: 2} )
5564 for PARAM in ${PARAMS[@]}
8594 # Lowercase the host to match how the rest of our domains are looked up
8695 HOST=$( echo " $HOST " | tr ' [:upper:]' ' [:lower:]' )
8796
88- BREW_PREFIX=$( brew --prefix)
8997 sudo -u " $USER " " $BREW_PREFIX /bin/ngrok" http " $HOST .$TLD :$PORT " --host-header=rewrite $PARAMS
9098
9199 exit
You can’t perform that action at this time.
0 commit comments