Fix Single CR causing issues with lines not being recognized as 2 lines #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
The line ending at
TestDeviceRegConnectivity/Test-DeviceRegConnectivity.ps1
Line 245 in 2b8d059
This ultimately meant that the script refused to acknowledge that anyone was an Administrator, and usually failed to run.
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
Get the code
I recommend you download the code manually through a browser, in case Git is trying to handle line-ending switches/updating by default - here is a link to a file version that has the issue https://raw.githubusercontent.com/Azure-Samples/TestDeviceRegConnectivity/2b8d0592cfcbd13a32546212c939924b70c57c0e/Test-DeviceRegConnectivity.ps1
Test the code
What to Check
Verify that the following are valid
Other Information
This also may fix issues #4 , #7 , if I am reading their error messages right
There are also several places that only have a LF, but no CR, which doesn't match the rest of the file, which has the whole CR-LF. Mainly, this seems to be the comments, and PowerShell often creates LF only content even when the file is CRLF endings by default, so this doesn't really affect functionality, but might be good to make it uniform across the whole file.
TestDeviceRegConnectivity/Test-DeviceRegConnectivity.ps1
Line 35 in 2b8d059
TestDeviceRegConnectivity/Test-DeviceRegConnectivity.ps1
Line 67 in 2b8d059
TestDeviceRegConnectivity/Test-DeviceRegConnectivity.ps1
Line 102 in 2b8d059
TestDeviceRegConnectivity/Test-DeviceRegConnectivity.ps1
Line 210 in 2b8d059
TestDeviceRegConnectivity/Test-DeviceRegConnectivity.ps1
Line 284 in 2b8d059
TestDeviceRegConnectivity/Test-DeviceRegConnectivity.ps1
Lines 301 to 514 in 2b8d059