Skip to content

Commit ea13439

Browse files
committed
fix(demo): set PUBLIC_TAILS_URL only if ngrok is running
Signed-off-by: David Chaiken <[email protected]>
1 parent cdfe8b4 commit ea13439

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

demo/ngrok-wait.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ if ! [ -z "$TAILS_NGROK_NAME" ]; then
2121
else
2222
echo " not found"
2323
fi
24-
export PUBLIC_TAILS_URL=$NGROK_ENDPOINT
25-
echo "Fetched ngrok tails server endpoint [$PUBLIC_TAILS_URL]"
24+
if [ -z "$NGROK_ENDPOINT" ] || [ "$NGROK_ENDPOINT" = "null" ]; then
25+
# setting PUBLIC_TAILS_URL to null confuses the agent because "null" is a truthy value in Python
26+
echo "PUBLIC_TAILS_URL not set and ngrok not available"
27+
else
28+
export PUBLIC_TAILS_URL=$NGROK_ENDPOINT
29+
echo "Fetched ngrok tails server endpoint [$PUBLIC_TAILS_URL]"
30+
fi
2631
fi
2732

2833
export AGENT_NAME=$1

0 commit comments

Comments
 (0)