Current behavior
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Expected behavior
Do not show docker info if docker daemon is not running
.zshrc)source $HOME/.zinit/bin/zinit.zsh
SPACESHIP_PROMPT_ORDER=(
package
node
golang
docker
kubectl
exec_time
jobs
line_sep
dir
git
char
)
zinit light denysdovhan/spaceship-prompt
Spaceship version: 3.11.2
Zsh version: 5.8 (x86_64-apple-darwin19.3.0)
Zsh framework: oh-my-zsh
Zsh plugin manager: zinit
Terminal emulator: iTerm
Operating system: macOS
Provide a screenshot that shows your issue.

Same here, I see it happens when there's a docker-compose.yml or Dockerfile in the directory but I guess it appeared after a recent automatic update because I didn't get this before with this same directory.
There seems to be a change between Docker client 19.03.8 (edit: I've pinned it down to 19.03.12) and 19.03.13 where, if docker cannot connect to the host, the error message is printed to STDOUT rather than STDERR.
This is causing the "Cannot connect" message to end up in the docker_version variable here: https://github.com/denysdovhan/spaceship-prompt/blob/master/sections/docker.zsh#L61
I hope it's the right place (so many docker related repos 馃槢), but I've created an issue on docker/cli about the issue: https://github.com/docker/cli/issues/2777
For those of you who are stumbling across this issue and don't really care much about the docker version can simply disable the docker section using this environment variable.
SPACESHIP_DOCKER_SHOW=false
Most helpful comment
For those of you who are stumbling across this issue and don't really care much about the docker version can simply disable the docker section using this environment variable.