bugfix: removed hardwired path in function

This commit is contained in:
Baipyrus 2024-11-25 16:14:47 +01:00
parent e1029ae1cd
commit d79c3bf43f
2 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ Write-Host "============================================" -ForegroundColor DarkG
# Installing Nerd Fonts # Installing Nerd Fonts
Write-Host "Installing Nerd Fonts..." -ForegroundColor Cyan Write-Host "Installing Nerd Fonts..." -ForegroundColor Cyan
ProcessUrlFiles -source "$dotfilesRepo\nerd-fonts" -fileExt ".zip" -progress $false ProcessUrlFiles -source "$dotfilesRepo\nerd-fonts" -fileExt ".zip" -progress $false
UnzipAndInstall -source "$dotfilesRepo\nerd-fonts" UnzipAndInstall -source "$dotfilesRepo\nerd-fonts" -destination "$env:LOCALAPPDATA\Microsoft\Windows\Fonts\"
# Final message # Final message
Write-Host "Windows setup complete!" -ForegroundColor Green Write-Host "Windows setup complete!" -ForegroundColor Green

View File

@ -165,7 +165,8 @@ function ProcessUrlFiles
function UnzipAndInstall function UnzipAndInstall
{ {
param ( param (
[string]$source [string]$source,
[string]$destination
) )
# Create temporary directory for unzip # Create temporary directory for unzip
@ -175,7 +176,6 @@ function UnzipAndInstall
{ New-Item -ItemType Directory -Path $tmpApp | Out-Null { New-Item -ItemType Directory -Path $tmpApp | Out-Null
} }
$destination = "$env:LOCALAPPDATA\Microsoft\Windows\Fonts\"
if (-not (Test-Path $destination)) if (-not (Test-Path $destination))
{ New-Item -ItemType Directory -Path $destination | Out-Null { New-Item -ItemType Directory -Path $destination | Out-Null
} }