mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
@@ -500,7 +500,16 @@ OPTIONS
|
||||
// the user calling "exit".
|
||||
while (!this.ShouldExit && this.myHost.Runspace != null)
|
||||
{
|
||||
string prompt = Prompt(this.myHost.Runspace);
|
||||
// If the prompt function failed for any reason, use a sane default
|
||||
string prompt;
|
||||
try
|
||||
{
|
||||
prompt = Prompt(this.myHost.Runspace);
|
||||
}
|
||||
catch
|
||||
{
|
||||
prompt = "PS> ";
|
||||
}
|
||||
|
||||
this.myHost.UI.Write(ConsoleColor.White, ConsoleColor.Black, prompt);
|
||||
string cmd = consoleReadLine.Read(this.myHost.Runspace);
|
||||
|
||||
Reference in New Issue
Block a user