devcontainers / devcontainers/cli

devcontainer exec: no error message when Docker is not running on macOS

Aperta
#1,187 0 commenti 0 reazioni 1 assegnatario Rivendicata da @v-Kaniska244 Vedi su GitHub
Lingua principale
TypeScript
Stelle
3k
Fork
457
Merge medio
13h 17m
PR unite (30g)
6

Descrizione

## Problem
When running `devcontainer exec` command on macOS without Docker Desktop installed or running, the command exits with a non-zero exit code, but **no error message is displayed** on stderr. This forces developers to guess what went wrong.

## Expected Behavior
The application should display a clear error message on stderr explaining that Docker cannot be reached, similar to what the `docker` CLI does.

## Current Behavior
```bash
$ devcontainer exec poetry --version
# No output, just exits with code 1
```

## Example of Good Error Messaging
The `docker` CLI provides helpful feedback:
```bash
$ docker ps
Cannot connect to the Docker daemon at unix:///Users/kamil/.docker/run/docker.sock. Is the docker daemon running?
```

## Impact
Poor error messaging negatively affects developer experience (DX). Users can't quickly diagnose issues and must resort to debugging or searching through documentation.

## Suggested Solution
When `devcontainer exec` fails to connect to Docker, it should print a descriptive error message to stderr, similar to:
```
Error: Cannot connect to Docker daemon. Is Docker Desktop running?
```

This would significantly improve the user experience and reduce confusion.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.