mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-25 03:12:21 +08:00
refactor: FindExecutable on Linux will always try to find file under ~/.local/bin
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -60,14 +60,7 @@ namespace SourceGit.Native
|
||||
finder.Zed(() =>
|
||||
{
|
||||
var exec = FindExecutable("zeditor");
|
||||
if (string.IsNullOrEmpty(exec))
|
||||
{
|
||||
exec = FindExecutable("zed");
|
||||
if (string.IsNullOrEmpty(exec))
|
||||
exec = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".local", "bin", "zed");
|
||||
}
|
||||
|
||||
return exec;
|
||||
return string.IsNullOrEmpty(exec) ? FindExecutable("zed") : exec;
|
||||
});
|
||||
return finder.Tools;
|
||||
}
|
||||
@@ -141,7 +134,8 @@ namespace SourceGit.Native
|
||||
return test;
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
var local = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".local", "bin", filename);
|
||||
return File.Exists(local) ? local : string.Empty;
|
||||
}
|
||||
|
||||
private string FindJetBrainsFleet(string localAppDataDir)
|
||||
|
||||
Reference in New Issue
Block a user