Skip to content

Metaparams should not be downcased #373

@Clebam

Description

@Clebam

Describe the Bug

dsc_base_prodiver.rb canonicalization converts everything to downcasen including metaparams which results in a comparison failure

dsc_scheduled_tasks:
  'patch_management':
    dsc_ensure: 'present'
    dsc_enable: true
    #//stuff
    require: File[D:/Temp/TOTO.txt] # Note the uppercase characters

Error: Failed to apply catalog: Could not find dependency File[d:/temp/toto.txt] for Dsc_scheduledtask[patch_management]

Here the characters are downcased

Expected Behavior

The metaparams should preserve their casing

Steps to Reproduce

Steps to reproduce the behavior:
Use a require on a resource

Environment

Windows Server 2019

Additional Context

I pinpointed the issue to this piece of code : https://github.com/puppetlabs/ruby-pwsh/blob/main/lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb#L83

It better be r.select so that the metaparams keep the original casing

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions