mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
fix: wrong path for sublime text command-line interface
This commit is contained in:
parent
cc6996444e
commit
c617331657
1 changed files with 4 additions and 5 deletions
|
@ -23,9 +23,8 @@ namespace SourceGit.Native
|
||||||
|
|
||||||
public string FindGitExecutable()
|
public string FindGitExecutable()
|
||||||
{
|
{
|
||||||
if (File.Exists("/usr/bin/git"))
|
// XCode built-in git
|
||||||
return "/usr/bin/git";
|
return File.Exists("/usr/bin/git") ? "/usr/bin/git" : string.Empty;
|
||||||
return string.Empty;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Models.ExternalTool> FindExternalTools()
|
public List<Models.ExternalTool> FindExternalTools()
|
||||||
|
@ -34,7 +33,7 @@ namespace SourceGit.Native
|
||||||
finder.VSCode(() => "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code");
|
finder.VSCode(() => "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code");
|
||||||
finder.VSCodeInsiders(() => "/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/bin/code");
|
finder.VSCodeInsiders(() => "/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/bin/code");
|
||||||
finder.Fleet(() => $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}/Applications/Fleet.app/Contents/MacOS/Fleet");
|
finder.Fleet(() => $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}/Applications/Fleet.app/Contents/MacOS/Fleet");
|
||||||
finder.SublimeText(() => "/Applications/Sublime Text.app/Contents/SharedSupport/bin");
|
finder.SublimeText(() => "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl");
|
||||||
return finder.Founded;
|
return finder.Founded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +68,7 @@ namespace SourceGit.Native
|
||||||
var tmp = Path.GetTempFileName();
|
var tmp = Path.GetTempFileName();
|
||||||
File.WriteAllText(tmp, builder.ToString());
|
File.WriteAllText(tmp, builder.ToString());
|
||||||
|
|
||||||
var proc = Process.Start("/usr/bin/osascript", $"\"{tmp}\"");
|
var proc = Process.Start("osascript", $"\"{tmp}\"");
|
||||||
proc.Exited += (o, e) => File.Delete(tmp);
|
proc.Exited += (o, e) => File.Delete(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue