Skip to content

Commit 7effee7

Browse files
🪲 [Fix] Tags into array, instead of concatenated string (#36)
## Description - Fix an issue where tags would be concatenated in a string, instead of a array of strings. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [x] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent e6d7855 commit 7effee7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/helpers/Build/Build-PSModuleManifest.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,17 +244,18 @@ function Build-PSModuleManifest {
244244
} catch {
245245
$repoLabels = @()
246246
}
247-
$manifestTags = @()
248-
$manifestTags = $PSData.Keys -contains 'Tags' ? ($PSData.Tags).Count -gt 0 ? $PSData.Tags : $repoLabels : $repoLabels
247+
$manifestTags = [Collections.Generic.List[string]]::new()
248+
$tags = $PSData.Keys -contains 'Tags' ? ($PSData.Tags).Count -gt 0 ? $PSData.Tags : $repoLabels : $repoLabels
249+
$tags | ForEach-Object { $manifestTags.Add($_) }
249250
# Add tags for compatability mode. https://docs.microsoft.com/en-us/powershell/scripting/developer/module/how-to-write-a-powershell-module-manifest?view=powershell-7.1#compatibility-tags
250251
if ($manifest.CompatiblePSEditions -contains 'Desktop') {
251252
if ($manifestTags -notcontains 'PSEdition_Desktop') {
252-
$manifestTags += 'PSEdition_Desktop'
253+
$manifestTags.Add('PSEdition_Desktop')
253254
}
254255
}
255256
if ($manifest.CompatiblePSEditions -contains 'Core') {
256257
if ($manifestTags -notcontains 'PSEdition_Core') {
257-
$manifestTags += 'PSEdition_Core'
258+
$manifestTags.Add('PSEdition_Core')
258259
}
259260
}
260261
$manifestTags | ForEach-Object { Write-Verbose "[Tags] - [$_]" }

0 commit comments

Comments
 (0)