Skip to content

Conversation

@bielawb
Copy link

@bielawb bielawb commented Jan 7, 2023

While working with VMware DSC in PowerShell 7 I noticed a weird issue where creating configuration with lower case keyword would result in an error.
It appears that for whatever reason, configuration keyword is removed using TrimStart. IMO, that is a terrible choice:

  • it takes a list of chars, not a string, so it's only coincidental it works as expected
  • it is case-sensitive, making language case-sensitive too (resulting in the issue like the one I faced).

To limit the amount of changes, I'm simply adding lower case c to the list of chars that are being trimmed, but I'd suggest using something different entirely to replace any combination of CoNfIgUrAtIoN that authors may come up with, as PowerShell is for sure not case-sensitive in the keyword realm, but VMware DSC appears to be exactly that.

@vmwclabot
Copy link

@bielawb, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

@bielawb bielawb force-pushed the bartek/lowerCaseKeyword branch from be8f427 to c78361b Compare January 7, 2023 23:27
@vmwclabot
Copy link

@bielawb, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants