From d79c3bf43f4be45c69e199236e7ef350dbfdba0e Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Mon, 25 Nov 2024 16:14:47 +0100 Subject: [PATCH] bugfix: removed hardwired path in function --- install_windows.ps1 | 2 +- util/windows.psm1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install_windows.ps1 b/install_windows.ps1 index c1591ff..14708c6 100644 --- a/install_windows.ps1 +++ b/install_windows.ps1 @@ -63,7 +63,7 @@ Write-Host "============================================" -ForegroundColor DarkG # Installing Nerd Fonts Write-Host "Installing Nerd Fonts..." -ForegroundColor Cyan 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 Write-Host "Windows setup complete!" -ForegroundColor Green diff --git a/util/windows.psm1 b/util/windows.psm1 index c1e9273..c6e8bfb 100644 --- a/util/windows.psm1 +++ b/util/windows.psm1 @@ -165,7 +165,8 @@ function ProcessUrlFiles function UnzipAndInstall { param ( - [string]$source + [string]$source, + [string]$destination ) # Create temporary directory for unzip @@ -175,7 +176,6 @@ function UnzipAndInstall { New-Item -ItemType Directory -Path $tmpApp | Out-Null } - $destination = "$env:LOCALAPPDATA\Microsoft\Windows\Fonts\" if (-not (Test-Path $destination)) { New-Item -ItemType Directory -Path $destination | Out-Null }