Skip to content

[direnv] DEVBOX_SHELL_ENABLED is missing from devbox generate direnv --print-envrc #2746

@miklschmidt

Description

@miklschmidt

What happened?

When using direnv to load the devbox environment, DEVBOX_SHELL_ENABLED is never set. The documentation is confusing on whether this is intended or not:

on env-variables documentation it says:

DEVBOX_SHELL_ENABLED Whether or not Devbox is enabled in the current shell. This is automatically set to 1 when you start a shell, run a script, or start services.

I guess it can be argued that direnv doesn't start a shell. However, the documentation explicitly says otherwise:

Image

This behavior has been observed on MacOS w/ Apple Silicon as well as Linux x86_64 (NixOS).

Steps to reproduce

  1. devbox generate direnv
  2. cd myproject
  3. echo $DEVBOX_SHELL_ENABLED prints nothing, expected 1.

Command

No response

devbox.json

Devbox version

0.16.0

Nix version

No response

What system does this bug occur on?

Linux (x86-64)

Debug logs

No response

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