Skip to content

Commit 285df45

Browse files
committed
fix: use warden env logs for quick tunnel URL extraction
docker compose logs without compose file args can't find the service. Delegate to warden env which properly constructs compose args.
1 parent d16aa01 commit 285df45

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

commands/cf.cmd

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,8 @@ case "${WARDEN_PARAMS[0]}" in
193193
fatal "WARDEN_QUICK_TUNNEL is not enabled for this project. Add WARDEN_QUICK_TUNNEL=1 to your .env file."
194194
fi
195195

196-
## extract the quick tunnel URL from container logs
197-
QUICK_URL=$(${DOCKER_COMPOSE_COMMAND} \
198-
--project-directory "${WARDEN_ENV_PATH}" -p "${WARDEN_ENV_NAME}" \
199-
logs quick-tunnel 2>/dev/null | grep -oE 'https://[a-zA-Z0-9-]+\.trycloudflare\.com' | tail -1)
196+
## extract the quick tunnel URL from container logs via warden env
197+
QUICK_URL=$("${WARDEN_BIN}" env logs quick-tunnel 2>/dev/null | grep -oE 'https://[a-zA-Z0-9-]+\.trycloudflare\.com' | tail -1)
200198

201199
if [[ -n "${QUICK_URL}" ]]; then
202200
echo ""

0 commit comments

Comments
 (0)