From 34c6d7b13c24538aa5f099e50e154b19fc0d63a8 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Sat, 17 Aug 2024 17:39:06 +0800 Subject: [PATCH] Sometimes the SDK is invalid. --- scripts/install-android-sdk.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/install-android-sdk.ps1 b/scripts/install-android-sdk.ps1 index 0efb9d4b89..167718d2cc 100644 --- a/scripts/install-android-sdk.ps1 +++ b/scripts/install-android-sdk.ps1 @@ -32,6 +32,9 @@ function Get-SdkManager { $cmdline | Get-ChildItem | ForEach-Object { Write-Host "${Indent} $_" } + } else { + Write-Host "${Indent} No command line tools found." + return "" } Write-Host "${Indent} Selecting the latest command line tools..." @@ -63,6 +66,9 @@ function Get-Adb { $platformtools = Join-Path "$SdkPath" "platform-tools" if (Test-Path $platformtools) { Write-Host "${Indent} Found platform tools: $platformtools" + } else { + Write-Host "${Indent} No platform tools found." + return "" } $adbExt = if (-not $IsMacOS -and -not $IsLinux) { ".exe" } else { "" }