Make sure to format the error message with an UNSIGNED int (#11667)
Closes #11556 ![image](https://user-images.githubusercontent.com/18356694/139715591-b18ef7c1-2967-42a5-9528-2522220aa177.png)
This commit is contained in:
parent
d3ca0e7878
commit
8826cc028b
|
@ -429,8 +429,9 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
|
||||||
// EXIT POINT
|
// EXIT POINT
|
||||||
const auto hr = wil::ResultFromCaughtException();
|
const auto hr = wil::ResultFromCaughtException();
|
||||||
|
|
||||||
|
// GH#11556 - make sure to format the error code to this string as an UNSIGNED int
|
||||||
winrt::hstring failureText{ fmt::format(std::wstring_view{ RS_(L"ProcessFailedToLaunch") },
|
winrt::hstring failureText{ fmt::format(std::wstring_view{ RS_(L"ProcessFailedToLaunch") },
|
||||||
fmt::format(_errorFormat, hr),
|
fmt::format(_errorFormat, static_cast<unsigned int>(hr)),
|
||||||
_commandline) };
|
_commandline) };
|
||||||
_TerminalOutputHandlers(failureText);
|
_TerminalOutputHandlers(failureText);
|
||||||
|
|
||||||
|
@ -457,6 +458,7 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// GH#11556 - make sure to format the error code to this string as an UNSIGNED int
|
||||||
winrt::hstring exitText{ fmt::format(std::wstring_view{ RS_(L"ProcessExited") }, fmt::format(_errorFormat, status)) };
|
winrt::hstring exitText{ fmt::format(std::wstring_view{ RS_(L"ProcessExited") }, fmt::format(_errorFormat, status)) };
|
||||||
_TerminalOutputHandlers(L"\r\n");
|
_TerminalOutputHandlers(L"\r\n");
|
||||||
_TerminalOutputHandlers(exitText);
|
_TerminalOutputHandlers(exitText);
|
||||||
|
|
Loading…
Reference in a new issue