Skip to content

[Git] Fix loss of environment propagation in Python scripts.#1173

Merged
Alexander-Miller merged 1 commit intoAlexander-Miller:masterfrom
jmsgrogan:fix_env_override
Dec 26, 2025
Merged

[Git] Fix loss of environment propagation in Python scripts.#1173
Alexander-Miller merged 1 commit intoAlexander-Miller:masterfrom
jmsgrogan:fix_env_override

Conversation

@jmsgrogan
Copy link
Copy Markdown

As described in this issue: #1172 git calls have started failing on systems like NixOs and Guix.

This started with this commit: 2dd6d86

The commit explicitly set the subprocess environment just to have the value: "LC_ALL": "C". This prevents systems like NixOs and Guix from passing shell environment variables to allow 'git' to be found in their stores.

The fix is to append "LC_ALL": "C" to the environment, rather than recreating a new env.

I did a basic test after to confirm that Emacs now launches with Treemacs by dropping in the modified scripts.

if mu_dir == "/":
continue

environ["LC_ALL"] = "C"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this approach environ["FOO"] = "BAR" was previously taken in one of the scripts before the most recent change - so there is some precedent for it.

@Alexander-Miller
Copy link
Copy Markdown
Owner

👍

@Alexander-Miller Alexander-Miller merged commit 50bcdb3 into Alexander-Miller:master Dec 26, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants