From 93a1bc49d75bc186d6b7e7cceff863a784fb9ddb Mon Sep 17 00:00:00 2001 From: Gerald Versluis Date: Fri, 7 Jun 2024 19:04:27 +0200 Subject: [PATCH] Update appium-install.ps1 (#22883) --- eng/scripts/appium-install.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/eng/scripts/appium-install.ps1 b/eng/scripts/appium-install.ps1 index 8099a2596377..5daff8db01d0 100644 --- a/eng/scripts/appium-install.ps1 +++ b/eng/scripts/appium-install.ps1 @@ -67,9 +67,11 @@ if (!(Test-Path $logsDir -PathType Container)) { $AppiumHome = $env:APPIUM_HOME Write-Output "APPIUM_HOME: $AppiumHome" -if (Test-Path $AppiumHome) { - Write-Output "Removing existing APPIUM_HOME Cache..." - Remove-Item -Path $AppiumHome -Recurse -Force +if ($AppiumHome) { + if (Test-Path $AppiumHome) { + Write-Output "Removing existing APPIUM_HOME Cache..." + Remove-Item -Path $AppiumHome -Recurse -Force + } } # Create the directory for appium home