Skip to content
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

Update line ending detection on configuration name replace #52

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

FabienTschanz
Copy link
Contributor

@NikCharlebois

This Pull Request updates the behavior for the next line ending detection when trying to replace the configuration name in ConvertTo-DscObject. The next line ending is checked for carriage return + line feed, but the line might only contain a line feed without carriage return (e.g. when using M365DSCRuleEvaluation, which contains an inline configuration definition which is only made of line feeds, without the carriage returns).

Without that updated line feed detection, not only the configuration name will be replaced, but everything down to the first resource definition, which then results in an incorrectly parsed DSC configuration.

@FabienTschanz FabienTschanz changed the title Update line ending detection and write Update line ending detection on configuration name replace Aug 20, 2024
@FabienTschanz
Copy link
Contributor Author

@NikCharlebois Checking in to see if this can be reviewed soon. Thank you.

@NikCharlebois NikCharlebois merged commit e298f0b into microsoft:master Sep 11, 2024
1 check passed
@FabienTschanz FabienTschanz deleted the fix/line-endings branch September 11, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants