fix and add throw if nothing from the list selected
This commit is contained in:
parent
5ecb50f6a5
commit
7f8d160661
1 changed files with 4 additions and 1 deletions
|
@ -159,9 +159,10 @@ function main {
|
||||||
elseif ($apks.getType().Name -eq 'String') {$selectedApk = $apks}
|
elseif ($apks.getType().Name -eq 'String') {$selectedApk = $apks}
|
||||||
else {
|
else {
|
||||||
$selectedApk = (renderForm -items $apks -label "Select apk file to patch" -title "Installer for ReVanced - apk selector" -mode One)
|
$selectedApk = (renderForm -items $apks -label "Select apk file to patch" -title "Installer for ReVanced - apk selector" -mode One)
|
||||||
if (-not $selectedApk) {throw "No apk selected!"}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (-not $selectedApk) {throw "No apk selected!"}
|
||||||
|
|
||||||
# Get available integrations
|
# Get available integrations
|
||||||
|
|
||||||
$integrationsList = New-Object System.Collections.ArrayList
|
$integrationsList = New-Object System.Collections.ArrayList
|
||||||
|
@ -221,6 +222,8 @@ function main {
|
||||||
$selectedDevice = (renderForm -items ($devices | ForEach-Object {$_.split()[0]}) -label "Select deployment target" -title "Installer for ReVanced - target" -mode One)
|
$selectedDevice = (renderForm -items ($devices | ForEach-Object {$_.split()[0]}) -label "Select deployment target" -title "Installer for ReVanced - target" -mode One)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (-not $selectedDevice) {throw "No device selected"}
|
||||||
|
|
||||||
# install to device
|
# install to device
|
||||||
|
|
||||||
$patcherArgs = "-jar", ".\app\revanced-cli.jar", "-a", ".\$selectedApk", "-c", "-d", "$selectedDevice", "-o", "$env:tmp\revanced.apk", "-m", ".\app\app-release-unsigned.apk", "-b", ".\app\revanced-patches.jar"
|
$patcherArgs = "-jar", ".\app\revanced-cli.jar", "-a", ".\$selectedApk", "-c", "-d", "$selectedDevice", "-o", "$env:tmp\revanced.apk", "-m", ".\app\app-release-unsigned.apk", "-b", ".\app\revanced-patches.jar"
|
||||||
|
|
Reference in a new issue