Skip to content

Improve the error when Herdr cannot resolve Bun #5

Description

@juan-r-rodriguez

herdr-annotate fails with No such file or directory (os error 2) when the Herdr daemon
does not expose Bun in its PATH, even though Bun works inside Herdr panes.

The underlying environment-inheritance issue is reported in Herdr:
herdrdev/herdr#3346

Could the plugin detect a missing bun executable and show an actionable message (for
example, point users to the Herdr issue) instead of the raw spawn error?

I verified that the plugin works when Bun is invoked through an absolute path, but that is
only a machine-specific workaround and should not be the default.

This is my env:

  • Herdr version: 0.8.2
  • Update channel (stable or preview): stable
  • Operating system: macOS 26.6.2 (25G83)
  • Terminal: Ghostty 1.3.1
  • Shell, if relevant: zsh (/bin/zsh)
  • Relevant config, if any: Homebrew is added by ~/.zprofile with eval "$(/opt/homebrew/bin/brew shellenv)"; no Herdr configuration changes are required to reproduce this.

I'm not sure how do you manage this to work, I needed to create hard links in herdr-plugin.toml like:

 -  command = ["bun", "src/export.ts"]
 +  command = ["/opt/homebrew/bin/bun", "src/export.ts"]

The Herdr maintainers clarified that this is expected when Herdr is started by brew services: the launchd-managed server has its own minimal PATH, while pane login shells separately extend PATH from .zprofile. Plugin argv commands inherit the server PATH, not the pane shell PATH.

A short note in the installation troubleshooting section would also help macOS users running Herdr through brew services.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions