Skip to content

Comments

Fix panic when watch rebuilds without up#13610

Merged
ndeloof merged 1 commit intodocker:mainfrom
maxproske:13609-fix-panic-tty-noup
Feb 24, 2026
Merged

Fix panic when watch rebuilds without up#13610
ndeloof merged 1 commit intodocker:mainfrom
maxproske:13609-fix-panic-tty-noup

Conversation

@maxproske
Copy link
Contributor

What I did

nil-check for when watch --no-up skips initializing the progress tty, but rebuild sends events to it

Steps to reproduce:

cat > compose.yaml <<'EOF'
services:
  test:
    build:
      dockerfile_inline: "FROM alpine"
    develop:
      watch:
        - action: rebuild
          path: ./trigger.txt
EOF

docker compose up --build -d
docker compose watch --no-up &
sleep 1
touch trigger.txt
# Rebuilding service(s) ["test"] after changes were detected...
# panic: runtime error: invalid memory address or nil pointer dereference

Related issue

Closes #13609

Signed-off-by: Max Proske <max@mproske.com>
@maxproske maxproske requested a review from a team as a code owner February 24, 2026 04:27
@maxproske maxproske requested review from glours and ndeloof February 24, 2026 04:27
@ndeloof ndeloof enabled auto-merge (rebase) February 24, 2026 16:11
@ndeloof ndeloof merged commit 85d6770 into docker:main Feb 24, 2026
39 checks passed
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/display/tty.go 0.00% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Panic on rebuild when using watch --no-up

2 participants