File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -275,9 +275,10 @@ Please run the command again with elevated rights (Run as Administrator) or prov
275275 # Nerd Fonts archives sometimes contain duplicate matching files in
276276 # compatibility subfolders. Keep a single file per filename.
277277 $remaining = @ (Get-ChildItem - Path $extractPath - Recurse - File - Include ' *.ttf' , ' *.otf' )
278- $preferred = $remaining | Sort-Object
279- @ { Expression = { if ($_.FullName -match ' (?i)[\\/]Windows Compatible[\\/]' ) { 1 } else { 0 } } },
278+ $preferred = $remaining | Sort-Object - Property @ (
279+ @ { Expression = { if ($_.FullName -match ' (?i)[\\/]Windows Compatible[\\/]' ) { 1 } else { 0 } } }
280280 @ { Expression = { $_.FullName.Length } }
281+ )
281282 $seenFileNames = [System.Collections.Generic.HashSet [string ]]::new([System.StringComparer ]::OrdinalIgnoreCase)
282283 $duplicateRemoved = 0
283284 foreach ($file in $preferred ) {
@@ -286,7 +287,7 @@ Please run the command again with elevated rights (Run as Administrator) or prov
286287 $duplicateRemoved ++
287288 }
288289
289- Write-Verbose " [$fontName ] - Variant '$Variant ' kept $ ( $keep.Count ) files , removed $removed and deduplicated $duplicateRemoved duplicates "
290+ Write-Verbose " [$fontName ] - Variant '$Variant ': kept $ ( $keep.Count ) , removed $removed , deduplicated $duplicateRemoved "
290291 }
291292
292293 Write-Verbose " [$fontName ] - Install to [$Scope ]"
You can’t perform that action at this time.
0 commit comments