Steps to reproduce
pwsh-preview ''
pwsh-preview -c ''
pwsh-preview -c ' '
# or in pwsh: pwsh-preview ' '
Expected behavior
'' or ' ' should be parsed correctly.
Actual behavior
Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'value')
at System.String.IndexOf(String value, Int32 startIndex, Int32 count, StringComparison comparisonType)
at System.String.IndexOf(String value, StringComparison comparisonType)
at Microsoft.PowerShell.CommandLineParameterParser.MatchSwitch(String switchKey, String match, String smallestUnambiguousMatch)
at Microsoft.PowerShell.CommandLineParameterParser.EarlyParse(String[] args)
at Microsoft.PowerShell.UnmanagedPSEntry.Start(String consoleFilePath, String[] args, Int32 argc)
at Microsoft.PowerShell.ManagedPSEntry.Main(String[] args)
If run it in bash/zsh, I will also get a core dump.
Environment data
Name Value
---- -----
PSVersion 7.0.0-preview.5
PSEdition Core
GitCommitId 7.0.0-preview.5
OS Linux 5.3.7-zen1-2-zen #1 ZEN SMP PREEMPT @1572002936
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Steps to reproduce
Expected behavior
''or' 'should be parsed correctly.Actual behavior
If run it in bash/zsh, I will also get a core dump.
Environment data