mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -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>
|
<string>SOURCE_GIT_VERSION.0</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>11.0</string>
|
<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>
|
<key>CFBundleExecutable</key>
|
||||||
<string>SourceGit</string>
|
<string>SourceGit</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
|
|
@ -68,6 +68,10 @@ namespace SourceGit.Commands
|
||||||
if (OperatingSystem.IsLinux())
|
if (OperatingSystem.IsLinux())
|
||||||
start.Environment.Add("LANG", "en_US.UTF-8");
|
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.
|
// Force using this app as git editor.
|
||||||
switch (Editor)
|
switch (Editor)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue