diff --git a/bin/dev b/bin/dev index 8c03122d0..f5e4d8d67 100755 --- a/bin/dev +++ b/bin/dev @@ -35,7 +35,11 @@ if [ "$USE_TAILSCALE" = "1" ]; then stop_tailscale() { tailscale serve --https=$TS_PORT off >/dev/null 2>&1; } trap stop_tailscale EXIT INT TERM - sudo tailscale serve --bg --https=$TS_PORT "http://fizzy.localhost:$PORT" >/dev/null 2>&1 + tailscale serve --bg --https=$TS_PORT localhost:$PORT >/dev/null 2>&1 + if ! tailscale serve status --json 2>/dev/null | jq -e ".TCP.\"$TS_PORT\"" >/dev/null 2>&1; then + echo "Error: tailscale serve failed. On Linux, run once: sudo tailscale set --operator=\$USER" >&2 + exit 1 + fi echo "Login with david@example.com to: https://$TS_HOSTNAME:$TS_PORT/" else echo "Login with david@example.com to: http://fizzy.localhost:$PORT/"