diff --git a/revanced.ps1 b/revanced.ps1 index dfdb803..67d3fb8 100644 --- a/revanced.ps1 +++ b/revanced.ps1 @@ -220,11 +220,13 @@ function main { # devices $devices = adb devices + if ($devices.Length -eq 2) { + throw "No devices found" + } $devices = $devices[1..($devices.length-2)] [String]$selectedDevice = '' - if ($devices.Length -eq 0) {throw "No devices found"} - elseif ($devices.Length -eq 1) { + if ($devices.Length -eq 1) { $selectedDevice = ($devices | ForEach-Object {$_.split()[0]})[0] } else {