Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit 75ad1b9

Browse files
Update DistroLauncher/DistroLauncher.cpp to better check wsl.exe exit code
Co-Authored-By: John Starks <jostarks@microsoft.com>
1 parent 72fe6a0 commit 75ad1b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

DistroLauncher/DistroLauncher.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ int wmain(int argc, wchar_t const *argv[])
121121

122122
// Check exitCode to see if wsl.exe returned that it could not start the Linux process
123123
// then prompt users for input so they can view the error message.
124-
if (exitCode == UINT_MAX) {
124+
if (SUCCEEDED(hr) && exitCode == UINT_MAX) {
125125
Helpers::PromptForInput();
126126
}
127127

@@ -169,4 +169,4 @@ int wmain(int argc, wchar_t const *argv[])
169169
}
170170

171171
return SUCCEEDED(hr) ? exitCode : 1;
172-
}
172+
}

0 commit comments

Comments
 (0)