Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Clebam opened this issue Feb 12, 2025 · 0 comments
Labels
bug The issue is a bug. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub help wanted The issue is up for grabs for anyone in the community.

Comments

@Clebam
Copy link

Clebam commented Feb 12, 2025

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
@Clebam Clebam changed the title xWindowsPackageCab Logpath parameter should be mandatory (or have a default value) xWindowsPackageCab Logpath parameter should be handled properly in Set-TargetResource Feb 12, 2025
@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub labels Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

2 participants