Skip to content

Commit dd7608c

Browse files
🩹 [Refactor]: Set $IsWindows variable based on PSEdition in Build-PSModuleRootModule.ps1 for improved environment detection
1 parent db4e395 commit dd7608c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,12 @@ $script:PSModuleInfo = Test-ModuleManifest -Path "$PSScriptRoot\$baseName.psd1"
153153
$script:PSModuleInfo | Format-List | Out-String -Stream | ForEach-Object { Write-Debug $_ }
154154
$scriptName = $script:PSModuleInfo.Name
155155
Write-Debug "[$scriptName] - Importing module"
156+
157+
# If in Windows PowerShell, set the $IsWindows variable to true.
156158
if ($PSEdition -eq 'Desktop') {
157159
$IsWindows = $true
158160
}
161+
159162
'@
160163
#endregion - Module post-header
161164

0 commit comments

Comments
 (0)