jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
7.83k stars 187 forks source link

Package binaries not available in `tmux` #2086

Open mootoday opened 1 month ago

mootoday commented 1 month ago

What happened?

I use devbox run tmux to start a pre-configured tmux session. Within that session, I can't directly use the installed packages. Please see https://github.com/mootoday/project-template and try to run gh --version in one of the three empty tmux panes on the right side of the terminal.

Steps to reproduce

  1. git clone git@github.com:mootoday/project-template.git
  2. cd project-template
  3. devbox run tmux
  4. Type gh --version in one of the empty panes on the right side – that fails, but I think it should succeed because I started tmux via devbox run tmux
  5. Type devbox run gh --version - that succeeds
  6. Type devbox shell - that fails, understandably because I'm already in a devbox shell due to devbox run tmux in step 3

Command

shell

devbox.json

{
  "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.10.7/.schema/devbox.schema.json",
  "packages": [
    "tmux@latest",
    "tmuxp@latest",
    "gh@latest"
  ],
  "shell": {
    "init_hook": [
      "gh auth status > /dev/null || gh auth login",
      "gh extension list | grep -q 'gh dash' || gh extension install dlvhdr/gh-dash"
    ],
    "scripts": {
      "tmux": [
        "tmuxp load --yes .config/tmux/tmuxp.yaml"
      ]
    }
  }
}

Devbox version

0.10.7

Nix version

nix (Nix) 2.19.3

What system does this bug occur on?

macOS (Apple Silicon)

Debug logs

No response