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

devbox generate direnv does not respect --config #2459

Open
itsdalmo opened this issue Dec 18, 2024 · 0 comments
Open

devbox generate direnv does not respect --config #2459

itsdalmo opened this issue Dec 18, 2024 · 0 comments
Labels
bug Something isn't working triage Issue needs triage

Comments

@itsdalmo
Copy link

itsdalmo commented Dec 18, 2024

What happened?

While trying to find a solution for #2457 I noticed that the devbox generate direnv command takes a --config flag which should contain a directory with a devbox.json, however this does not appear to be working.

Steps to reproduce

$ devbox generate direnv --config ./tools/devbox/ci
$ cat .envrc
<...>
 eval "$(devbox generate direnv --print-envrc)"
<...>

And if I manually add the --config flag, the output does not reflect it:

$ devbox generate direnv --print-envrc --config ./tools/devbox/ci
use_devbox() {
    watch_file devbox.json devbox.lock
    eval "$(devbox shellenv --init-hook --install --no-refresh-alias)"
}
use devbox

i.e. the watch_file should point to ./tools/devbox/ci/devbox.json and ./tools/devbox/ci/devbox.lock. Also the devbox shellenv needs to include the --config flag in order to set up the correct environment (devbox shellenv appears to support he --config flag as expected).

Command

No response

devbox.json

{
  "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.11.1/.schema/devbox.schema.json",
  "include": [
    "path:../baseline"
  ]
}

PS: The problem is not affected by the content of the devbox.json, but I've included it anyhow.

Devbox version

0.13.6

Nix version

nix (Nix) 2.24.9

What system does this bug occur on?

macOS (Apple Silicon)

Debug logs

Not relevant (there is no crash)

@itsdalmo itsdalmo added bug Something isn't working triage Issue needs triage labels Dec 18, 2024
@itsdalmo itsdalmo changed the title devbox generate direnv does not respect --config (draft bug report) devbox generate direnv does not respect --config Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issue needs triage
Development

No branches or pull requests

1 participant