Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow direnv to be installed via Devbox for integration #2412

Open
kpervin opened this issue Nov 15, 2024 · 0 comments
Open

Allow direnv to be installed via Devbox for integration #2412

kpervin opened this issue Nov 15, 2024 · 0 comments
Labels
feature New feature or request triage Issue needs triage

Comments

@kpervin
Copy link

kpervin commented Nov 15, 2024

What problem are you trying to solve?

Currently we need to install direnv outside of devbox.json for direnv to work. However, that seems antithetical to the entire purpose of devbox, as it means team members need to individually install direnv for it to work.

What solution would you like?

Add the means for devbox generate direnv to install direnv in devbox.json and then use that binary for all subsequent work.

Alternatives you've considered

Adding "eval \"$(direnv hook bash)\"" to init_hook in devbox.json is a workaround, but it means the shell is reloaded, causing hooks to run twice. For example:

{
  "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.6/.schema/devbox.schema.json",
  "shell": {
    "init_hook": [
      "eval \"$(direnv hook bash)\"",
      "echo 'Welcome to devbox!'"     
    ]
  }
}
$ devbox shell
Starting a devbox shell...
Welcome to devbox!
direnv: loading ~/projects/adaptiiv-iac/.envrc
direnv: using devbox
Welcome to devbox!
direnv: export +FOO
@kpervin kpervin added feature New feature or request triage Issue needs triage labels Nov 15, 2024
@kpervin kpervin closed this as completed Nov 15, 2024
@kpervin kpervin closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 2024
@kpervin kpervin reopened this Nov 15, 2024
@kpervin kpervin closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 2024
@kpervin kpervin reopened this Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request triage Issue needs triage
Development

No branches or pull requests

1 participant