Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -745,8 +745,8 @@ private void ParseHelper(string[] args)
}
else if (MatchSwitch(switchKey, "login", "l"))
{
// This handles -Login on Windows only, where it does nothing.
// On *nix, -Login is handled much earlier to improve startup performance.
// On Windows, '-Login' does nothing.
// On *nix, '-Login' is already handled much earlier to improve startup performance, so we do nothing here.
}
else if (MatchSwitch(switchKey, "noexit", "noe"))
{
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleShell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static class ConsoleShell
/// <param name="helpText">Help text for minishell. This is displayed on 'minishell -?'.</param>
/// <param name="args">Commandline parameters specified by user.</param>
/// <returns>An integer value which should be used as exit code for the process.</returns>
public static int Start(string? bannerText, string? helpText, string?[] args)
public static int Start(string? bannerText, string? helpText, string[] args)
{
return Start(InitialSessionState.CreateDefault2(), bannerText, helpText, args);
}
Expand All @@ -31,7 +31,7 @@ public static int Start(string? bannerText, string? helpText, string?[] args)
/// <param name="helpText">Help text for the shell.</param>
/// <param name="args">Commandline parameters specified by user.</param>
/// <returns>An integer value which should be used as exit code for the process.</returns>
public static int Start(InitialSessionState initialSessionState, string? bannerText, string? helpText, string?[] args)
public static int Start(InitialSessionState initialSessionState, string? bannerText, string? helpText, string[] args)
{
if (initialSessionState == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public sealed class UnmanagedPSEntry
/// Length of the passed in argument array.
/// </param>
[Obsolete("Callers should now use UnmanagedPSEntry.Start(string[], int)", error: true)]
public static int Start(string consoleFilePath, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 2)]string?[] args, int argc)
public static int Start(string consoleFilePath, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 2)]string[] args, int argc)
{
return Start(args, argc);
}
Expand All @@ -47,7 +47,7 @@ public static int Start(string consoleFilePath, [MarshalAs(UnmanagedType.LPArray
/// <param name="argc">
/// Length of the passed in argument array.
/// </param>
public static int Start([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 1)]string?[] args, int argc)
public static int Start([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 1)]string[] args, int argc)
{
if (args == null)
{
Expand Down
12 changes: 12 additions & 0 deletions tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -2323,6 +2323,8 @@ function CleanupGeneratedSourceCode
'[System.Management.Automation.Internal.ArchitectureSensitiveAttribute]'
'[Microsoft.PowerShell.Commands.SelectStringCommand.FileinfoToStringAttribute]'
'[System.Runtime.CompilerServices.IsReadOnlyAttribute]'
'[System.Runtime.CompilerServices.NullableContextAttribute('
'[System.Runtime.CompilerServices.NullableAttribute((byte)0)]'
)

$patternsToReplace = @(
Expand Down Expand Up @@ -2355,6 +2357,16 @@ function CleanupGeneratedSourceCode
ApplyTo = "System.Management.Automation"
Pattern = "Unable to resolve assembly 'Assembly(Name=System.Security.AccessControl"
Replacement = "// Unable to resolve assembly 'Assembly(Name=System.Security.AccessControl"
},
@{
ApplyTo = "Microsoft.PowerShell.ConsoleHost"
Pattern = "[System.Runtime.CompilerServices.NullableAttribute((byte)2)]"
Replacement = "/* [System.Runtime.CompilerServices.NullableAttribute((byte)2)] */"
},
@{
ApplyTo = "Microsoft.PowerShell.ConsoleHost"
Pattern = "[System.Runtime.CompilerServices.NullableAttribute((byte)1)]"
Replacement = "/* [System.Runtime.CompilerServices.NullableAttribute((byte)1)] */"
}
)

Expand Down