threads / discuss / 59437

System Environmental Variables being wiped on update

Subject: System Environmental Variables being wiped on update

## tl;dr

2 messages between Mar 22, 2023 and Apr 3, 2023.

replies: 1people: 2as markdown or json

Richard Spano· Mar 22, 2023, 10:34 UTC · lore
Hello,
I couldn’t find anything for this so we wanted to reach out.
We have GIT installed on machine and we have “C:\Program Files\Git\usr\bin\” added to the PATH system variable (windows). When updating GIT this addition to the PATH variable is wiped. If this is not noticed then we have issues with GIT until we manually re-add this in.
Is there a way to stop these variables being removed during a GIT update?
Regards, 
      Richard Spano
   
Johannes Schindelin· Apr 3, 2023, 15:10 UTC · re: Richard Spano · lore

Re: System Environmental Variables being wiped on update

Hi Richard,
On Wed, 22 Mar 2023, Richard Spano wrote:
Show 6 quoted lines
> We have GIT installed on machine and we have “C:\Program
> Files\Git\usr\bin\” added to the PATH system variable (windows). When
> updating GIT this addition to the PATH variable is wiped. If this is not
> noticed then we have issues with GIT until we manually re-add this in.
>
> Is there a way to stop these variables being removed during a GIT update?

The Git for Windows-specific part of the `PATH` is considered to be "owned" by Git for Windows. This is required to allow for future changes similar to the ones when we moved Git for Windows from MSys to MSYS2, where the paths changed that needed to be added.

However, I have good news for you: if you _want_ `usr\bin` to be added to the `PATH`, you only need to select the 3rd option on the "Adjusting your PATH environment" page of the installer.

You might want to review the implications, though.

Ciao, Johannes

← back to recent threads