-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Labels
Resolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.The issue won't be fixed, possibly due to compatibility reason.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtimeWG-ReviewedA Working Group has reviewed this and made a recommendationA Working Group has reviewed this and made a recommendation
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
I tried finding an existing open/closed issue for this but could not. I'm not even sure if it's a PowerShell thing or a .NET thing.
In Windows PowerShell 5.1, a setup like [System.String]::Join($null, (1,2,3)).Length returns 3, however in PowerShell 7.4.7, this returns 5. If I change out the $null for an empty string, I get the expected length of 3.
Expected behavior
PS D:\Repos\PSAppDeployToolkit\src> [System.String]::Join($null, (1,2,3)).Length
3Actual behavior
PS C:\Users\mjr40> [System.String]::Join($null, (1,2,3)).Length
5Error details
Notes on the issue can be read in PSAppDeployToolkit issue PSAppDeployToolkit/PSAppDeployToolkit#1413.
Environment data
PS C:\Users\mjr40> $PSVersionTable
Name Value
---- -----
PSVersion 7.4.7
PSEdition Core
GitCommitId 7.4.7
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Resolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.The issue won't be fixed, possibly due to compatibility reason.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtimeWG-ReviewedA Working Group has reviewed this and made a recommendationA Working Group has reviewed this and made a recommendation

