Skip to content

cached-nix-shell blocks certain environment variables that nix-shell doesn't. #26

@uri-canva

Description

@uri-canva

The list of environment variables that cached-nix-shell keeps (https://sourcegraph.com/github.com/xzfc/cached-nix-shell@1955b9d0aaaf90337541ab799d5071eeaac2360c/-/blob/src/main.rs?L172-184) and that nix-shell keeps (https://sourcegraph.com/github.com/NixOS/[email protected]/-/blob/src/nix-build/nix-build.cc?L107-110) are not in sync. The environment variables that cached-nix-shell keeps in addition are not an issue since the --pure will have the nix-shell invocation strip them anyway if needed, but the ones that are missing lead to a difference in behaviour when using cached-nix-shell as a drop in replacement of nix-shell. For example not keeping TERM results in bash defaulting to dumb and setting it in the environment (https://sourcegraph.com/github.com/bminor/[email protected]/-/blob/variables.c?L496), leading to programs disabling ncurses and similar terminal UIs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions