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 = {
134
134
# endregion - Analyze source files
135
135
136
136
# 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 @'
143
138
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
144
139
'PSAvoidAssignmentToAutomaticVariable', 'IsWindows',
145
140
Justification = 'IsWindows doesnt exist in PS5.1'
@@ -148,6 +143,14 @@ $MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {
148
143
'PSUseDeclaredVarsMoreThanAssignments', 'IsWindows',
149
144
Justification = 'IsWindows doesnt exist in PS5.1'
150
145
)]
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 @'
151
154
[CmdletBinding()]
152
155
param()
153
156
'@
You can’t perform that action at this time.
0 commit comments