desktop / dugite

Elegant bindings for working with Git in your Node applications
MIT License
460 stars 149 forks source link

Handle env vars in a case-preserving, case-insensitive manner on Windows #574

Open niik opened 3 months ago

niik commented 3 months ago

This is a follow-up to #570 and attempts to tackle Windows environment variable shenanigans for all environment variables and not just PATH. The main change is the introduction of EnvMap, a class that behaves as a case-insensitive, case-preserving map on Windows and a regular case-sensitive map on other platforms. This class is used in lib/git-environment.ts to handle environment variables in a consistent manner across platforms.

I've also bumped Prettier to 3.3.1 so it can handle my syntax and specified the version of TypeScript used by Visual Studio Code in .vscode/settings.json because I was building this on an old VM with an old VS code and noticed that it wouldn't complete properly.

tidy-dev commented 3 months ago

@niik Just making sure you were aware of the failing tests (I have been putting off reviewing till those are happy)

niik commented 3 months ago

Just making sure you were aware of the failing tests (I have been putting off reviewing till those are happy)

I was not aware, thanks for the heads up!