mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix Exit-PSHostProcess cmdlet crash issue
This commit is contained in:
+1
-1
@@ -417,7 +417,7 @@ namespace Microsoft.Samples.PowerShell.Host
|
||||
|
||||
// Read commands and run them until the ShouldExit flag is set by
|
||||
// the user calling "exit".
|
||||
while (!this.ShouldExit)
|
||||
while (!this.ShouldExit && this.myHost.Runspace != null)
|
||||
{
|
||||
string prompt = Prompt(this.myHost.Runspace);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user