fix: prevent crash in Custom Action when executable path is missing (#646)
Some checks are pending
Continuous Integration / Package (push) Blocked by required conditions
Continuous Integration / Build (push) Waiting to run
Continuous Integration / Prepare version string (push) Waiting to run
Localization Check / localization-check (push) Waiting to run

This commit is contained in:
Chiahong 2024-11-03 17:00:17 +08:00 committed by GitHub
parent 06762615b6
commit fba84c8297
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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