Skip to content

xWindowsPackageCab Logpath parameter should be handled properly in Set-TargetResource #775

@Clebam

Description

@Clebam

Problem description

The Logpath parameter is not mandatory in set-targetresource : https://github.com/dsccommunity/xPSDesiredStateConfiguration/blob/main/source/DSCResources/DSC_xWindowsPackageCab/DSC_xWindowsPackageCab.psm1#L145

But is called anyway https://github.com/dsccommunity/xPSDesiredStateConfiguration/blob/main/source/DSCResources/DSC_xWindowsPackageCab/DSC_xWindowsPackageCab.psm1#L158

The same logic as in Get-TartgetResource should be applied : https://github.com/dsccommunity/xPSDesiredStateConfiguration/blob/main/source/DSCResources/DSC_xWindowsPackageCab/DSC_xWindowsPackageCab.psm1#L77

Verbose logs

You end up with a throw by DISM : dism\Add-WindowsPackage : DismInitialize failed. Error code = 0x80070057

DSC configuration

N/A

Suggested solution

The same logic as in Get-TartgetResource should be applied : https://github.com/dsccommunity/xPSDesiredStateConfiguration/blob/main/source/DSCResources/DSC_xWindowsPackageCab/DSC_xWindowsPackageCab.psm1#L77

Operating system the target node is running

Windows Server 2019

PowerShell version and build the target node is running

5.1

xPSDesiredStateConfiguration version

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue is a bug.good first issueThe issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHubhelp wantedThe issue is up for grabs for anyone in the community.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions