Skip to content

e2e eval.sh hangs when output is piped through grep/tail #472

Description

@kwannoel

Problem

Running eval.sh with piped output (e.g., ./e2e/eval.sh <path> spec.ts 2>&1 | grep ...) causes the command to hang indefinitely. The pipe stays open because eval.sh spawns background server processes (Axum, Vite) whose stdout/stderr are inherited by the pipe, so the pipe never closes even after Playwright finishes.

Reproduction

# Hangs:
./e2e/eval.sh /path/to/worktree e2e/specs/smoke.spec.ts 2>&1 | grep "passed"

# Works fine:
./e2e/eval.sh /path/to/worktree e2e/specs/smoke.spec.ts 2>&1

Expected

eval.sh should work correctly when piped. Server subprocess stdout/stderr should be redirected to /dev/null or a log file so they don't hold the pipe open.

Suggested fix

In e2e/eval.sh, redirect server output to files or /dev/null:

(cd "$WORKTREE/src-tauri" && PORT="$AXUM_PORT" cargo run --bin server --features server) >/dev/null 2>&1 &
(cd "$WORKTREE" && DEV_PORT="$VITE_PORT" AXUM_PORT="$AXUM_PORT" npm run dev -- --strictPort) >/dev/null 2>&1 &

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions