Skip to content

dsc_timezone has incorrect dscmeta_resource_implementation #241

@ShawnHardwick

Description

@ShawnHardwick

Describe the Bug

dsc_timezone resource in dsc-computermanagementdsc (8.5.0-0-1) is defined as Class instead of MOF for dscmeta_resource_implementation.

Using the implementation for Get-DSCResourceImplementation:
https://github.com/puppetlabs/Puppet.Dsc/blob/main/src/Puppet.Dsc/internal/functions/Get-DscResourceImplementation.ps1#L92

# Returns 'Class'
using module 'C:\ProgramData\PuppetLabs\puppet\cache\lib\puppet_x\computermanagementdsc\dsc_resources\ComputerManagementDsc\DSCResources\DSC_TimeZone\DSC_TimeZone.psm1'
Try {
  $ErrorActionPreference = 'Stop'
  $null = [TimeZone]
  'Class'
} Catch {
  'MOF'
}

What does [TimeZone] actually return?

using module 'C:\ProgramData\PuppetLabs\puppet\cache\lib\puppet_x\computermanagementdsc\dsc_resources\ComputerManagementDsc\DSCResources\DSC_TimeZone\DSC_TimeZone.psm1'
[TimeZone] | fl *

Output:

# Truncated for brevity
Module                     : CommonLanguageRuntimeLibrary
Assembly                   : mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
TypeHandle                 : System.RuntimeTypeHandle
DeclaringMethod            :
BaseType                   : System.Object
UnderlyingSystemType       : System.TimeZone
FullName                   : System.TimeZone
AssemblyQualifiedName      : System.TimeZone, mscorlib, Version=4.0.0.0, Culture=neutral,
                             PublicKeyToken=b77a5c561934e089
Namespace                  : System
StructLayoutAttribute      : System.Runtime.InteropServices.StructLayoutAttribute
Name                       : TimeZone
MemberType                 : TypeInfo

Additional Context

Add any other context about the problem here.

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