mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
refactor: rewrite the way to support HomeBrew pathes on macOS (#507)
This commit is contained in:
parent
a52ebffbf3
commit
a8685f2047
2 changed files with 4 additions and 5 deletions
|
@ -12,11 +12,6 @@
|
|||
<string>SOURCE_GIT_VERSION.0</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>11.0</string>
|
||||
<key>LSEnvironment</key>
|
||||
<dict>
|
||||
<key>PATH</key>
|
||||
<string>/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
|
||||
</dict>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>SourceGit</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
|
|
|
@ -68,6 +68,10 @@ namespace SourceGit.Commands
|
|||
if (OperatingSystem.IsLinux())
|
||||
start.Environment.Add("LANG", "en_US.UTF-8");
|
||||
|
||||
// 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");
|
||||
|
||||
// Force using this app as git editor.
|
||||
switch (Editor)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue