mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
enhance: append to PATH on MacOS instead of overriding it (#546)
This commit is contained in:
parent
9a2ea71f41
commit
3951549e5c
1 changed files with 11 additions and 1 deletions
|
@ -199,7 +199,17 @@ namespace SourceGit.Commands
|
|||
|
||||
// Fix sometimes `LSEnvironment` not working on macOS
|
||||
if (OperatingSystem.IsMacOS())
|
||||
start.Environment.Add("PATH", "/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin");
|
||||
{
|
||||
if (start.Environment.TryGetValue("PATH", out var path))
|
||||
{
|
||||
path = "/opt/homebrew/bin:/opt/homebrew/sbin:" + path;
|
||||
}
|
||||
else
|
||||
{
|
||||
path = "/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin";
|
||||
}
|
||||
start.Environment.Add("PATH", path);
|
||||
}
|
||||
|
||||
// Force using this app as git editor.
|
||||
switch (Editor)
|
||||
|
|
Loading…
Reference in a new issue