Skip to content

devbox generate direnv does not respect --config #2459

Description

@itsdalmo

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageIssue needs triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions