mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 21:30:37 +08:00
fix: crash when the pre-push hook is a broken symlink (#1991)
This commit is contained in:
@@ -644,8 +644,15 @@ namespace SourceGit.ViewModels
|
||||
if (!File.Exists(path))
|
||||
return false;
|
||||
|
||||
var content = File.ReadAllText(path);
|
||||
return content.Contains("git lfs pre-push");
|
||||
try
|
||||
{
|
||||
var content = File.ReadAllText(path);
|
||||
return content.Contains("git lfs pre-push");
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task InstallLFSAsync()
|
||||
|
||||
Reference in New Issue
Block a user