Skip to content

v0.1.1 — pane directory and container environment

Choose a tag to compare

@gambtho gambtho released this 12 Aug 06:44
· 4 commits to main since this release

Bug-fix release. Both fixes are in the exec path and both change observable behavior, so this is worth taking if you are on v0.1.0.

Fixed

Panes now open in the directory you were actually in. The working directory was read from the wrapper's own process, but Herdr runs a plugin pane from the plugin root — it has to, since manifest commands are plugin-relative. Every launch therefore looked like an out-of-repo checkout: every pane printed the "current directory is not under …" notice, and panes opened from a subdirectory silently started at the container workspace root. The directory now comes from Herdr's invocation context, and the notice is back to meaning what it says.

Panes now see the environment the container sets up for itself. sh -lc is not the container user's shell, and a login-but-not-interactive shell reads no rc file — so PATH entries and API endpoints written by postCreateCommand and friends were missing, and an agent pointed at a local model proxy by its container's setup script would quietly bypass it. Panes now run the container user's own shell, interactively.

New

  • repos."<root>".shell — override the shell instead of probing the container's passwd database.
  • repos."<root>".env — KEY=value assignments passed to docker exec -e, for environment a repository expresses only in devcontainer.json's remoteEnv.

Behavior worth knowing

  • bash is not run as a login shell. It reads ~/.bashrc only when interactive and not a login shell, so -l would suppress the very file this release exists to load. bash gets -i/-ic; every other known shell keeps -li/-lic and the /etc/profile values that come with it.
  • "Known" is a verified list. sh, ash, dash, busybox, zsh, ksh, mksh, pdksh, yash, and fish each accept those combined flags. Anything else is driven with bare -c, because not every shell takes them — tcsh -lic fails with "Unknown option", which would produce a pane that never opens. That fallback is the one case where a command pane is not interactive and no startup file is guaranteed.
  • rc files run now, and an rc file that changes directory wins. docker exec -w still places the shell correctly, but a cd in ~/.zshrc — some images bake one in — runs afterwards.
  • remoteEnv is still not parsed. Its effective value merges Features and image-label metadata that devcontainer up never reports, so reading devcontainer.json alone would produce a partial environment that reads as authoritative. A pane's environment comes from the image, the shell's startup files, and env — anything you depend on belongs in env.
  • Fallbacks say so. A shell probe that cannot answer prints why rather than silently using sh, and a context directory that will not resolve is named rather than quietly swapped.

Install this release

herdr plugin install gambtho/herdr-devcontainer --ref v0.1.1

Requirements

Unchanged from v0.1.0: Herdr 0.8.0+, Linux or WSL2, Git, Docker, the Dev Containers CLI, and Rust 1.74+ for the install-time build.

Known limitations

Unchanged from v0.1.0, including that a linked worktree checked out outside the main repository directory is not separately mounted, and panes opened there start at the container workspace root.