Filter PATH

This commit is contained in:
Matthieu Gautier 2024-05-07 14:45:03 +02:00
parent 15bf9f63f6
commit 5268a9a683
1 changed files with 8 additions and 1 deletions

View File

@ -49,6 +49,13 @@ class WinBashConfigInfo(ConfigInfo):
def get_env(self): def get_env(self):
env = super().get_env() env = super().get_env()
env["PATH"] += ["C:\\msys64\\usr\\bin"] PATH_ENV = env["PATH"]
PATH_ENV = filter(
lambda p: p
not in ["C:\\Program Files\\Git\\bin", "C:\\Program Files\\Git\\usr\\bin"],
PATH_ENV,
)
env["PATH"][:] = list(PATH_ENV)
# env["PATH"] += ["C:\\msys64\\usr\\bin"]
env["SHELL"] = "C:\\Windows\\System32\\bash.exe" env["SHELL"] = "C:\\Windows\\System32\\bash.exe"
return env return env