dsccommunity / GPRegistryPolicyDsc

DSC resources used to apply and manage local group policies by modifying the respective .pol file.
MIT License
21 stars 7 forks source link

Solve Issue #30, DscResources.Common in submodule instead of GPRegistryPolicyDsc.Common #31

Closed NicolasBn closed 1 year ago

NicolasBn commented 2 years ago

Pull Request (PR) description

With the submodule GPRegistryPolicyDsc.Common, there is an issue with internationalization. To fix this, DscResources.Common module is used instead of GPRegistryPolicyDsc.Common.

This Pull Request (PR) fixes the following issues

Task list


This change is Reviewable

codecov[bot] commented 2 years ago

Codecov Report

Merging #31 (320d394) into master (bbf0164) will decrease coverage by 2%. Report is 1 commits behind head on master. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #31    +/-   ##
=====================================
- Coverage      95%   93%    -2%     
=====================================
  Files           4     3     -1     
  Lines         479   357   -122     
=====================================
- Hits          456   334   -122     
  Misses         23    23            
Files Coverage Δ
...reshRegistryPolicy/MSFT_RefreshRegistryPolicy.psm1 100% <100%> (ø)
...FT_RegistryPolicyFile/MSFT_RegistryPolicyFile.psm1 99% <100%> (ø)
...ryPolicyFileParser/GPRegistryPolicyFileParser.psm1 88% <100%> (+<1%) :arrow_up:
FLeven commented 2 years ago

Is still not working, it will reference the sub module path:

`$script:resourceHelperModulePath = Join-Path -Path $script:modulesFolderPath -ChildPath 'DscResource.Common'

Import-Module -Name $script:resourceHelperModulePath`

If i change the import to "Import-Module -Name DscResource.Common" everything works as expected.

NicolasBn commented 2 years ago

@FLeven Did you have DscResource.Common in folders referenced in $env:PSModulePath?

FLeven commented 2 years ago

@NicolasBn I installed the module from the gallery, if it is not a submodule anymore, I like to "see" and check it for updates from time to time. That's why "Import-Module -Name DscResource.Common" is working.

johlju commented 1 year ago

DscResource.Common should be bundled with the module GPRegistryPolicyDsc, that is the only way to avoid this module will break when breaking changes are introduced in DscResource.Common. The correct version of the DscResource.Common that is required is pinned using the RequiredModules.psd1 when build this module. If a newer version should be used, a new version of the module GPRegistryPolicyDsc need to be build and deploy.