Skip to content

Commit

Permalink
Removed PSModulePath manipulation from task (#24)
Browse files Browse the repository at this point in the history
Co-authored-by: Gael <[email protected]>
  • Loading branch information
raandree and gaelcolas authored Apr 4, 2023
1 parent fc5a03d commit 428131a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Increase build speed of root configuration by only importing required Composites/Resources.
- Added ''UseEnvironment'' parameter to cater for RSOP for identical node names in different environments.
- Adding Home.md to wikiSource and correct casing.
- Removed PSModulePath manipulation from task `CompileRootConfiguration.build.ps1`. This is now handled by the Sampler task `Set_PSModulePath`.
- Redesign of the function Split-Array. Most of the time it was not working as expected, especially when requesting larger ChunkCounts (see AutomatedLab/AutomatedLab.Common/#118)
- Redesign of the function Split-Array. Most of the time it was not working as expected, especially when requesting larger ChunkCounts (see AutomatedLab/AutomatedLab.Common/#118).
- Improved error handling when compiling MOF files and when calling 'Get-DscResource'.
- Redesign of the function 'Split-Array'. Most of the time it was not working as expected, especially when requesting larger ChunkCounts (see AutomatedLab/AutomatedLab.Common/#118).
Expand Down
8 changes: 0 additions & 8 deletions source/Tasks/CompileRootConfiguration.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@ task CompileRootConfiguration {
Start-Transcript -Path "$BuildOutput\Logs\CompileRootConfiguration.log"
try
{
$originalPSModulePath = $env:PSModulePath
$env:PSModulePath = ($env:PSModulePath -split [System.IO.Path]::PathSeparator).Where({
$_ -notmatch ([regex]::Escape('powershell\7\Modules')) -and
$_ -notmatch ([regex]::Escape('Program Files\WindowsPowerShell\Modules')) -and
$_ -notmatch ([regex]::Escape('Documents\PowerShell\Modules'))
}) -join [System.IO.Path]::PathSeparator

Write-Build Green ''
if ((Test-Path -Path (Join-Path -Path $SourcePath -ChildPath RootConfiguration.ps1)) -and
(Test-Path -Path (Join-Path -Path $SourcePath -ChildPath CompileRootConfiguration.ps1)))
Expand Down Expand Up @@ -105,7 +98,6 @@ task CompileRootConfiguration {
}
finally
{
$env:PSModulePath = $originalPSModulePath
Stop-Transcript
}

Expand Down

0 comments on commit 428131a

Please sign in to comment.