mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2025-01-11 23:57:21 -08:00
fix: crash if the executable file can not be found
This commit is contained in:
parent
addc756fbf
commit
a6420aff9b
1 changed files with 10 additions and 10 deletions
|
@ -53,18 +53,8 @@ namespace SourceGit.Commands
|
||||||
proc.BeginOutputReadLine();
|
proc.BeginOutputReadLine();
|
||||||
proc.BeginErrorReadLine();
|
proc.BeginErrorReadLine();
|
||||||
proc.WaitForExit();
|
proc.WaitForExit();
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Dispatcher.UIThread.Invoke(() =>
|
|
||||||
{
|
|
||||||
App.RaiseException(repo, e.Message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var exitCode = proc.ExitCode;
|
var exitCode = proc.ExitCode;
|
||||||
proc.Close();
|
|
||||||
|
|
||||||
if (exitCode != 0)
|
if (exitCode != 0)
|
||||||
{
|
{
|
||||||
var errMsg = builder.ToString();
|
var errMsg = builder.ToString();
|
||||||
|
@ -74,5 +64,15 @@ namespace SourceGit.Commands
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Dispatcher.UIThread.Invoke(() =>
|
||||||
|
{
|
||||||
|
App.RaiseException(repo, e.Message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
proc.Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue