aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2018-01-23 12:37:01 +0100
committerTony Sarajärvi <tony.sarajarvi@qt.io>2018-02-05 14:13:08 +0000
commit24f6a2f28a567da4f71f2bb6bc5d606ca5e4beee (patch)
treef81bda7e99fb97b442b613c3cacebe4832f1ff42
parent324a16f67c40d5a97838561ef9fb7c25c5d5b1d9 (diff)
Provisioning on windows: Fix deletion of utils
We want to be able to re-provision machiens without errors. The directory doesn't exist on the machine any more. Change-Id: I2b5b92037492e51aeb4d041d62f371b8546cb0a3 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
-rw-r--r--coin/provisioning/common/windows/windows_removethemall.ps18
1 files changed, 5 insertions, 3 deletions
diff --git a/coin/provisioning/common/windows/windows_removethemall.ps1 b/coin/provisioning/common/windows/windows_removethemall.ps1
index 0e584900..96c448e3 100644
--- a/coin/provisioning/common/windows/windows_removethemall.ps1
+++ b/coin/provisioning/common/windows/windows_removethemall.ps1
@@ -56,6 +56,8 @@ Function Remove-Path {
}
# Remove Android sdk and ndk
-dir c:\utils\android* | ForEach { Rename-Item $_ $_"-deleted" }
-[Environment]::SetEnvironmentVariable("ANDROID_NDK_HOME",$null,"User")
-[Environment]::SetEnvironmentVariable("ANDROID_SDK_HOME",$null,"User")
+If (Test-Path "c:\utils") {
+ dir c:\utils\android* | ForEach { Rename-Item $_ $_"-deleted" }
+ [Environment]::SetEnvironmentVariable("ANDROID_NDK_HOME",$null,"User")
+ [Environment]::SetEnvironmentVariable("ANDROID_SDK_HOME",$null,"User")
+}