From bea8b829c701eee3c5b0bd6fe41c2f3f7df48d9b Mon Sep 17 00:00:00 2001 From: Lucaskyy Date: Mon, 11 Apr 2022 11:44:59 +0200 Subject: [PATCH] fix: make integrations optional --- src/main/kotlin/app/revanced/cli/Main.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/app/revanced/cli/Main.kt b/src/main/kotlin/app/revanced/cli/Main.kt index e671451b..ab6f6080 100644 --- a/src/main/kotlin/app/revanced/cli/Main.kt +++ b/src/main/kotlin/app/revanced/cli/Main.kt @@ -20,13 +20,12 @@ class Main { inApk: String, inSignatures: String, inPatches: String, - integrations: String, + inIntegrations: String?, inOutput: String, ) { val apk = Preconditions.isFile(inApk) val signatures = Preconditions.isFile(inSignatures) val patchesFile = Preconditions.isFile(inPatches) - val integrationsFile = Preconditions.isFile(integrations) val output = Preconditions.isDirectory(inOutput) val patcher = Patcher( @@ -36,7 +35,10 @@ class Main { .toTypedArray() ) - patcher.addFiles(integrationsFile) + inIntegrations?.let { + val integrations = Preconditions.isFile(it) + patcher.addFiles(integrations) + } PatchLoader.injectPatches(patchesFile) val patches = Patches.loadPatches() @@ -81,7 +83,7 @@ class Main { fullName = "integrations", shortName = "i", description = "Integrations APK file" - ).required() + ) val output by parser.option( ArgType.String, fullName = "output",