Skip to content

Commit e1cff37

Browse files
authored
Use AllocConsole before initializing CLR to ensure console is attached (#70)
1 parent 95a52ab commit e1cff37

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/powershell-native/nativemsh/pwrshplugin/pwrshclrhost.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ unsigned int PowerShellCoreClrWorker::LaunchClr(
3737
_In_ LPCWSTR wszRuntimeVersion,
3838
_In_ LPCSTR friendlyName)
3939
{
40+
// Allocate a console so that the codepage is setup correctly
41+
AllocConsole();
4042
return commonLib->LaunchCoreCLR(hostWrapper, hostEnvironment, friendlyName);
4143
}
4244

0 commit comments

Comments
 (0)