File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,7 +55,10 @@ param(
5555. $PSScriptRoot / common.ps1
5656. $PSScriptRoot / Helpers/ PSModule- Helpers.ps1
5757
58- Install-ModuleIfNotInstalled " powershell-yaml" " 0.4.7" | Import-Module
58+ Install-ModuleIfNotInstalled " powershell-yaml" " 0.4.12" | Import-Module
59+
60+ $loadedModule = Get-Module powershell- yaml
61+ Write-Host " powershell-yaml version loaded: $ ( $loadedModule.Version ) from $ ( $loadedModule.ModuleBase ) "
5962
6063Set-StrictMode - Version 3
6164
@@ -68,8 +71,11 @@ function GetPackageNode($package) {
6871 return [PSCustomObject ]@ {
6972 name = $packageInfo.PackageTocHeader
7073 href = $packageInfo.PackageLevelReadmeHref
71- # This is always one package and it must be an array
72- children = $packageInfo.TocChildren
74+ # This is always one package and it must be an array.
75+ # Cast to [string[]] to strip PSObject wrapping added by Sort-Object,
76+ # which causes ConvertTo-Yaml to serialize string properties (e.g. Length)
77+ # instead of string values.
78+ children = [string []]$packageInfo.TocChildren
7379 };
7480}
7581
You can’t perform that action at this time.
0 commit comments