Skip to content

Commit 1734e53

Browse files
🩹 [Refactor]: Replace direct script execution with Import-PowerShellDataFile for module manifest loading in Build-PSModuleRootModule.ps1
1 parent e818294 commit 1734e53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎scripts/helpers/Build/Build-PSModuleRootModule.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ param()
160160
#region - Module post-header
161161
Add-Content -Path $rootModuleFile -Force -Value @'
162162
$baseName = [System.IO.Path]::GetFileNameWithoutExtension($PSCommandPath)
163-
$script:PSModuleInfo = . "$PSScriptRoot\$baseName.psd1"
163+
$script:PSModuleInfo = Import-PowerShellDataFile -Path "$PSScriptRoot\$baseName.psd1"
164164
$script:PSModuleInfo | Format-List | Out-String -Stream | ForEach-Object { Write-Debug $_ }
165165
$scriptName = $script:PSModuleInfo.Name
166166
Write-Debug "[$scriptName] - Importing module"

0 commit comments

Comments
 (0)