dscr-for-vmware icon indicating copy to clipboard operation
dscr-for-vmware copied to clipboard

Making sure that both Configuration and configuration work

Open bielawb opened this issue 3 years ago • 2 comments

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.

bielawb avatar Jan 07 '23 23:01 bielawb

@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 <[email protected]> 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.

vmwclabot avatar Jan 07 '23 23:01 vmwclabot

@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 <[email protected]> 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.

vmwclabot avatar Jan 07 '23 23:01 vmwclabot