File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -134,12 +134,7 @@ $MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {
134134 # endregion - Analyze source files
135135
136136 # region - Module header
137- $headerFilePath = Join-Path - Path $ModuleOutputFolder - ChildPath ' header.ps1'
138- if (Test-Path - Path $headerFilePath ) {
139- Get-Content - Path $headerFilePath - Raw | Add-Content - Path $rootModuleFile - Force
140- $headerFilePath | Remove-Item - Force
141- } else {
142- Add-Content - Path $rootModuleFile - Force - Value @'
137+ Add-Content - Path $rootModuleFile - Force - Value @'
143138[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
144139 'PSAvoidAssignmentToAutomaticVariable', 'IsWindows',
145140 Justification = 'IsWindows doesnt exist in PS5.1'
@@ -148,6 +143,14 @@ $MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {
148143 'PSUseDeclaredVarsMoreThanAssignments', 'IsWindows',
149144 Justification = 'IsWindows doesnt exist in PS5.1'
150145)]
146+ '@
147+
148+ $headerFilePath = Join-Path - Path $ModuleOutputFolder - ChildPath ' header.ps1'
149+ if (Test-Path - Path $headerFilePath ) {
150+ Get-Content - Path $headerFilePath - Raw | Add-Content - Path $rootModuleFile - Force
151+ $headerFilePath | Remove-Item - Force
152+ } else {
153+ Add-Content - Path $rootModuleFile - Force - Value @'
151154[CmdletBinding()]
152155param()
153156'@
You can’t perform that action at this time.
0 commit comments