Skip to content

Commit

Permalink
ci: update font paths and add installation check for windows os
Browse files Browse the repository at this point in the history
- update font paths to use the correct environment variable
- add missing font installation check for windows os in the ci workflow
  • Loading branch information
falcucci committed Sep 19, 2024
1 parent 98188d3 commit a78432b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,21 +199,21 @@ jobs:
if: matrix.os == 'windows-2022'
shell: powershell
run: |
$scoopDir = "$env:USERPROFILE\scoop\apps\nerd-fonts\current"
$fontPaths = @(
"$scoopDir\Monaspace-NF\*.ttf",
"$scoopDir\FiraCode-NF\*.ttf",
"$scoopDir\ProFont-NF\*.ttf",
"$scoopDir\Cascadia-Code\*.ttf",
"$scoopDir\CascadiaCode-NF\*.ttf",
"$scoopDir\CascadiaMono-NF\*.ttf",
"$scoopDir\CascadiaCode-NF-Mono\*.ttf",
"$scoopDir\CascadiaCode-NF-Propo\*.ttf",
"$scoopDir\Noto-NF\*.ttf"
"$env:USERPROFILE\scoop\apps\FiraCode-NF\current\*.ttf",
"$env:USERPROFILE\scoop\apps\ProFont-NF\current\*.ttf",
"$env:USERPROFILE\scoop\apps\Cascadia-Code\current\*.ttf",
"$env:USERPROFILE\scoop\apps\CascadiaCode-NF\current\*.ttf",
"$env:USERPROFILE\scoop\apps\CascadiaMono-NF\current\*.ttf",
"$env:USERPROFILE\scoop\apps\CascadiaCode-NF-Mono\current\*.ttf",
"$env:USERPROFILE\scoop\apps\CascadiaCode-NF-Propo\current\*.ttf",
"$env:USERPROFILE\scoop\apps\Noto-NF\current\*.ttf"
)
foreach ($path in $fontPaths) {
foreach ($font in Get-ChildItem -Path $path) {
Add-FontResource -FilePath $font.FullName
if (Test-Path -Path $path) {
foreach ($font in Get-ChildItem -Path $path) {
Add-FontResource -FilePath $font.FullName
}
}
}
Expand Down

0 comments on commit a78432b

Please sign in to comment.