fix: prevent crash in Custom Action when executable path is missing

This commit is contained in:
Chiahong Hong 2024-11-03 15:14:18 +08:00
parent 06762615b6
commit ae4d4c876e
No known key found for this signature in database
GPG key ID: 77021906D88E7150

View file

@ -45,6 +45,9 @@ namespace SourceGit.Commands
try
{
proc.Start();
proc.BeginOutputReadLine();
proc.BeginErrorReadLine();
proc.WaitForExit();
}
catch (Exception e)
{
@ -54,9 +57,6 @@ namespace SourceGit.Commands
});
}
proc.BeginOutputReadLine();
proc.BeginErrorReadLine();
proc.WaitForExit();
proc.Close();
}
}