Skip to content

Error: too long environment variables, please use --rmenv #3678

@simonfxr

Description

@simonfxr

I just ran into this error.

My LS_COLORS env var is rather big (~5kb), which lead to:
Error: too long environment variables, please use --rmenv

I also can not work around the problem by passing --rmenv=LS_COLORS setting rmenv LS_COLORS in globals.local does also not work.
The problem is that calling unsetenv(*ptr) in main does not modify the envp passed to main(), extern char ** environ; should be used instead. Also I guess, that the profile is loaded after the check, so setting it in a profile won't work. Maybe this should be supported?

Also I don't understand what this check is trying to accomplish, any explanation would be appreciated.

For now I can just increase the limit by patching and recompiling myself.

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