-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Fix powershell to not crash on converting recursive array to bool #3208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@PetSerAl, It will cover your contributions to all Microsoft-managed open source projects. |
Code changes look good - we do need the cla to be signed before it can be merged. |
@PetSerAl Thanks for your contribution! |
Hi, I am closing and re-opening this PR to bump the CLA bot. Sorry for the inconvenience! |
@PetSerAl, |
One possible breaking change came to my mind: $a = ,,$false
$b = ,[PSObject](,$false)
!!$a # $true
!!$b # was $false, now is $true So, this PR make PowerShell behavior more consistent in regard to wrapping array into |
I think the behavior with the fix reflects the original intention of the code. Here is the comment in
And as you said, now the conversion is more consistent:
After Fix
Using a nested array in |
It's definitely obscure, I'm not worried about the change. |
Fixing #3207