Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions src/helpers/Build/Build-PSModuleRootModule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,6 @@ $MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {
#endregion - Analyze source files

#region - Module header
Add-Content -Path $rootModuleFile -Force -Value @'
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
'PSAvoidAssignmentToAutomaticVariable', 'IsWindows',
Justification = 'IsWindows does not exist in PS5.1'
)]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
'PSUseDeclaredVarsMoreThanAssignments', 'IsWindows',
Justification = 'IsWindows does not exist in PS5.1'
)]
'@

$headerFilePath = Join-Path -Path $ModuleOutputFolder -ChildPath 'header.ps1'
if (Test-Path -Path $headerFilePath) {
Get-Content -Path $headerFilePath -Raw | Add-Content -Path $rootModuleFile -Force
Expand All @@ -162,10 +151,6 @@ $script:PSModuleInfo | Format-List | Out-String -Stream | ForEach-Object { Write
$scriptName = $script:PSModuleInfo.Name
Write-Debug "[$scriptName] - Importing module"

if ($PSEdition -eq 'Desktop') {
$IsWindows = $true
}

'@
#endregion - Module post-header

Expand Down
Loading