mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Make pwsh server modes implicitly not show banner (#17921)
This commit is contained in:
@@ -914,21 +914,25 @@ namespace Microsoft.PowerShell
|
||||
else if (MatchSwitch(switchKey, "socketservermode", "so"))
|
||||
{
|
||||
_socketServerMode = true;
|
||||
_showBanner = false;
|
||||
ParametersUsed |= ParameterBitmap.SocketServerMode;
|
||||
}
|
||||
else if (MatchSwitch(switchKey, "servermode", "s"))
|
||||
{
|
||||
_serverMode = true;
|
||||
_showBanner = false;
|
||||
ParametersUsed |= ParameterBitmap.ServerMode;
|
||||
}
|
||||
else if (MatchSwitch(switchKey, "namedpipeservermode", "nam"))
|
||||
{
|
||||
_namedPipeServerMode = true;
|
||||
_showBanner = false;
|
||||
ParametersUsed |= ParameterBitmap.NamedPipeServerMode;
|
||||
}
|
||||
else if (MatchSwitch(switchKey, "sshservermode", "sshs"))
|
||||
{
|
||||
_sshServerMode = true;
|
||||
_showBanner = false;
|
||||
ParametersUsed |= ParameterBitmap.SSHServerMode;
|
||||
}
|
||||
else if (MatchSwitch(switchKey, "noprofileloadtime", "noprofileloadtime"))
|
||||
|
||||
@@ -331,7 +331,7 @@ namespace PSTests.Parallel
|
||||
Assert.False(cpp.AbortStartup);
|
||||
Assert.True(cpp.NoExit);
|
||||
Assert.False(cpp.ShowShortHelp);
|
||||
Assert.True(cpp.ShowBanner);
|
||||
Assert.False(cpp.ShowBanner);
|
||||
Assert.True(cpp.SocketServerMode);
|
||||
Assert.Null(cpp.ErrorMessage);
|
||||
}
|
||||
@@ -348,7 +348,7 @@ namespace PSTests.Parallel
|
||||
Assert.False(cpp.AbortStartup);
|
||||
Assert.True(cpp.NoExit);
|
||||
Assert.False(cpp.ShowShortHelp);
|
||||
Assert.True(cpp.ShowBanner);
|
||||
Assert.False(cpp.ShowBanner);
|
||||
Assert.True(cpp.ServerMode);
|
||||
Assert.Null(cpp.ErrorMessage);
|
||||
}
|
||||
@@ -365,7 +365,7 @@ namespace PSTests.Parallel
|
||||
Assert.False(cpp.AbortStartup);
|
||||
Assert.True(cpp.NoExit);
|
||||
Assert.False(cpp.ShowShortHelp);
|
||||
Assert.True(cpp.ShowBanner);
|
||||
Assert.False(cpp.ShowBanner);
|
||||
Assert.True(cpp.NamedPipeServerMode);
|
||||
Assert.Null(cpp.ErrorMessage);
|
||||
}
|
||||
@@ -382,7 +382,7 @@ namespace PSTests.Parallel
|
||||
Assert.False(cpp.AbortStartup);
|
||||
Assert.True(cpp.NoExit);
|
||||
Assert.False(cpp.ShowShortHelp);
|
||||
Assert.True(cpp.ShowBanner);
|
||||
Assert.False(cpp.ShowBanner);
|
||||
Assert.True(cpp.SSHServerMode);
|
||||
Assert.Null(cpp.ErrorMessage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user