Skip to content

Why devbox shellenv and devbox global shellenv export all existing envvars ? #2826

@gasuketsu

Description

@gasuketsu

What problem are you trying to solve?

Currently, both devbox shellenv and devbox global shellenv export not only the environment variables that actually need to be modified, but also unrelated variables such as HOSTNAME and LANG.
Depending on the distribution, some environment variables are set as read‑only (for example, openSUSE marks variables like PROFILEREAD as read‑only).
When running eval "$(devbox global shellenv)" in an environment where such read‑only variables exist, an unexpected error occurs, such as:

(eval):55: read-only variable: PROFILEREAD

What solution would you like?

Redefining environment variables that are unrelated to devbox with their original values should not be necessary.
Therefore, I believe that devbox shellenv and devbox global shellenv should export only the environment variables that are strictly required by devbox, and avoid exporting unrelated ones.

Alternatives you've considered

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requesttriageIssue needs triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions