fix: crash when the pre-push hook is a broken symlink (#1991)

This commit is contained in:
cdammanintopix
2025-12-19 11:28:08 +01:00
committed by GitHub
parent 44fc98c070
commit 5f2984f983

View File

@@ -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()