From 24b6d1f11571346f7492824bbcee1e3fdc441f64 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Sun, 24 Nov 2024 23:41:49 +0100 Subject: [PATCH] replace unzip with builtin Expand-Archive tool --- util/windows.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/windows.psm1 b/util/windows.psm1 index eef66dc..443b8a3 100644 --- a/util/windows.psm1 +++ b/util/windows.psm1 @@ -175,7 +175,7 @@ function UnzipAndInstall { $fileName = [System.IO.Path]::GetFileNameWithoutExtension($file.Name) Write-Host "Extracting archive $tmpApp\$fileName.zip to $tmpApp\$fileName\..." -ForegroundColor Cyan - unzip -o "$tmpApp\$fileName.zip" -d "$tmpApp\$fileName" | Out-Null + Expand-Archive "$tmpApp\$fileName.zip" -DestinationPath "$tmpApp\$fileName" | Out-Null Write-Host "Installing fonts from $tmpApp\$fileName\ for current user..." -ForegroundColor Cyan Copy-Item -Path "$tmpApp\$fileName\*" -Destination "$env:LOCALAPPDATA\Microsoft\Windows\Fonts\" -Force -ErrorAction SilentlyContinue