v0.1.2 — find dev containers labelled by VS Code on Windows
Bug-fix release for a discovery defect found on real use.
The bug
stop reported "no running dev container" for a container running in front of the user, and the pane path's ambiguity check was silently checking an empty set.
Discovery matched on one label:
docker ps -a --filter label=devcontainer.local_folder=<repo-root>
Labels are written once, at container creation. VS Code on Windows creates them with local_folder holding the host's UNC view of the WSL path — \\wsl.localhost\Ubuntu\home\you\repo — which no POSIX repository root can equal.
Nothing repairs it afterward. Compose-based dev containers are reused by Compose's own project name, so devcontainer up kept handing back the VS Code-created container while discovery stayed blind to it: the container looked freshly opened by Herdr and then could not be stopped.
The fix
Discovery now also matches devcontainer.config_file, which the Dev Containers CLI resolves from inside WSL and which therefore holds a POSIX path on those same containers. Both keys stay exact-match — reconstructing the UNC form from WSL_DISTRO_NAME was rejected as guessing at how the host renders a path. Docker ANDs repeated --filter label arguments, so this is a second docker ps whose results are unioned and collapsed by container id.
Hardening on the same axis
Several paths could report a container as absent when the answer was simply unknown. All now say so instead:
- An unreadable plugin config or an escaping repo-relative
configvalue silently narrowed the search and reported the empty result as fact. - A
docker pstimeout surfaced asdocker command failed:with no detail. - A listing truncated by a read error, or by the 64 KiB capture cap, parsed cleanly and was indexed as the complete set of containers.
- The two lookups are not atomic, so a container that started between them could be retained in its stale
exitedstate. detectalready knew which config path existed and discarded it, costing an extradocker psagainst a path known to be missing.- The multiple-containers error claimed every id carried
devcontainer.local_folder=<root>— false in exactly the case it most often reports.
Install
herdr plugin install gambtho/herdr-devcontainer --ref v0.1.2Full changelog: v0.1.1...v0.1.2