From 3b240d6fab0d408d2f073e6e3224e208f30fad58 Mon Sep 17 00:00:00 2001 From: blue Date: Sun, 16 Jun 2019 15:55:25 +0100 Subject: [PATCH] Always clean up working directory --- Get-Bootcamp.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Get-Bootcamp.ps1 b/Get-Bootcamp.ps1 index c073c1e..658fd39 100644 --- a/Get-Bootcamp.ps1 +++ b/Get-Bootcamp.ps1 @@ -106,4 +106,6 @@ if ($Install) { do { Write-Output "Sleeping 20 seconds"; Start-Sleep -Seconds 20 } while (Get-Process -Name "msiexec" -ErrorAction SilentlyContinue) if (-not $KeepFiles) { Remove-Item -Path "$landingDir" -Recurse -Force -ErrorAction SilentlyContinue } } -else { exit } + +Write-Host "Cleaning up working directory..." +Remove-Item -Path $workingDir -Recurse