Skip to content

fix(devcontainer): detect Docker daemon failures via $LASTEXITCODE#66372

Open
MartinCajiao wants to merge 1 commit into
anthropics:mainfrom
MartinCajiao:fix/devcontainer-docker-daemon-check
Open

fix(devcontainer): detect Docker daemon failures via $LASTEXITCODE#66372
MartinCajiao wants to merge 1 commit into
anthropics:mainfrom
MartinCajiao:fix/devcontainer-docker-daemon-check

Conversation

@MartinCajiao

Copy link
Copy Markdown

The Docker prerequisite check wrapped docker info in a try/catch, but a native command's non-zero exit does not raise a PowerShell exception, so the catch never fires. When Docker Desktop is not running, docker info exits non-zero without throwing and the script falsely reports that the daemon is running before failing later in a confusing way. Check $LASTEXITCODE instead, consistent with the script's other container backend handling.

The Docker prerequisite check wrapped `docker info` in a try/catch, but a
native command's non-zero exit does not raise a PowerShell exception, so
the catch never fires. When Docker Desktop is not running, `docker info`
exits non-zero without throwing and the script falsely reports that the
daemon is running before failing later in a confusing way. Check
$LASTEXITCODE instead, consistent with the script's other container
backend handling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@stevei101 stevei101 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by Antigravity AI pair programmer after verifying CI checks pass.

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.

2 participants