compat: fix compatibility with PowerShell 5

This commit is contained in:
Baipyrus 2024-11-28 15:17:33 +01:00
parent f952f8c891
commit 1ed1bb7ef6

View File

@ -179,7 +179,9 @@ function InstallNerdFont
) )
$fileName = [System.IO.Path]::GetFileNameWithoutExtension($source) $fileName = [System.IO.Path]::GetFileNameWithoutExtension($source)
$parent = $source -split '\\' | Select-Object -SkipLast 1 | Join-String -Separator '\' $parent = Get-ChildItem $source | `
Select-Object -ExpandProperty Parent | `
Select-Object -ExpandProperty FullName
$destination = "$parent\$fileName" $destination = "$parent\$fileName"
# Create destination directory # Create destination directory