-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Line ending fix for Exception Message on ConvertFrom-StringData #18336
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
Line ending fix for Exception Message on ConvertFrom-StringData #18336
Conversation
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
Yes I am aware this is possibly the smallest commit in the powershell repo 😅 |
Test failed due to unrelated CI instability I think? https://dev.azure.com/powershell/PowerShell/_build/results?buildId=111677&view=ms.vss-test-web.build-test-results-tab&runId=1958580&resultId=100545&paneView=debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@GigaScratch Thanks for your contribution! |
PR Summary
It was discovered in #17507 that if you try perform
ConvertFrom-StringData
on a String with CRLF Line Endings, the error message obtained in$Error.Exception.Message
is pretty much unusable due to it using a string that was split using\n
, leaving the carriage return to mess things up.Jhoneill wrote all this out along with a solution in a lovely comment here
PR Context
Aims to resolve #17507
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).