From fb8d534b4cade1bb20fc6433109b46afb5e02bc0 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sun, 5 Mar 2017 13:51:34 +0100 Subject: Fixed file overwrite problem. --- dist/windows/InstallerTemplate.ps1 | 6 +++--- dist/windows/compile.ps1 | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/windows/InstallerTemplate.ps1 b/dist/windows/InstallerTemplate.ps1 index 2b7c5713d..af60009f2 100644 --- a/dist/windows/InstallerTemplate.ps1 +++ b/dist/windows/InstallerTemplate.ps1 @@ -206,7 +206,7 @@ if ($Install) [System.IO.File]::WriteAllBytes("$TempFilePath", $CompressedFileContentAsBytes) Write-Host " Extracting ZIP file to: $InstallPath" - Expand-Archive "$TempFilePath" -OutputPath $InstallPath + Expand-Archive "$TempFilePath" -OutputPath $InstallPath -Force -ShowProgress Remove-Item $TempFilePath @@ -249,7 +249,7 @@ elseif ($Update) Write-Host " Install directory: $InstallPath" if (Test-Path -Path $InstallPath) { Write-Host " Cleaning up installation directory '$InstallPath'." -ForegroundColor Yellow - Get-ChildItem -Path $InstallPath -Depth 0 | foreach { Remove-Item $_ -Recurse -ErrorAction SilentlyContinue } + Get-ChildItem -Path $InstallPath -Depth 0 | foreach { Remove-Item $_.FullName -Recurse -Force } } Write-Host " Removing GHDL from PATH variables in Machine, User, Session ..." -ForegroundColor Yellow @@ -272,7 +272,7 @@ elseif ($Update) [System.IO.File]::WriteAllBytes("$TempFilePath", $CompressedFileContentAsBytes) Write-Host " Extracting ZIP file to: $InstallPath" - Expand-Archive "$TempFilePath" -OutputPath $InstallPath + Expand-Archive "$TempFilePath" -OutputPath $InstallPath -ShowProgress Remove-Item $TempFilePath diff --git a/dist/windows/compile.ps1 b/dist/windows/compile.ps1 index d829d2f52..f75729192 100644 --- a/dist/windows/compile.ps1 +++ b/dist/windows/compile.ps1 @@ -628,7 +628,7 @@ else Write-Host " Install directory: $InstallPath" if (Test-Path -Path $InstallPath) { Write-Host " Cleaning up installation directory '$InstallPath'." -ForegroundColor Yellow - Get-ChildItem -Path $InstallPath -Depth 0 | foreach { Remove-Item $_ -Recurse -ErrorAction SilentlyContinue } + Get-ChildItem -Path $InstallPath -Depth 0 | foreach { Remove-Item $_.FullName -Recurse -Force } } Write-Host " Removing GHDL from PATH variables in Machine, User, Session ..." -ForegroundColor Yellow @@ -701,7 +701,7 @@ else Write-Host " Install directory: $InstallPath" if (Test-Path -Path $InstallPath) { Write-Host " Removing installation directory '$InstallPath'." -ForegroundColor Yellow - Remove-Item $InstallPath -Recurse -ErrorAction SilentlyContinue + Remove-Item $InstallPath -Recurse -Force -ErrorAction SilentlyContinue } Write-Host " Removing GHDL from PATH variables in Machine, User, Session ..." -ForegroundColor Yellow @@ -721,7 +721,7 @@ else Write-Host Exit-Script - } # Update + } # Uninstall } # Clean -- cgit v1.2.3