Skip to content

Commit

Permalink
feat: use new patch naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Jul 11, 2023
1 parent 9c148c9 commit f6c221d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/1_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Learn how to ReVanced CLI.
```bash
java -jar revanced-cli.jar
-b revanced-patches.jar \
-l
-l # Names of all patches will be in kebab-case
```

- ### 💉 Use ReVanced CLI to patch an APK file but deploy without root permissions
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/app/revanced/cli/command/MainCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ internal object MainCommand : Runnable {
}

// Add patch name
val patchName = patch.patchName.padStart(25)
val patchName = patch.patchName.lowercase().replace(" ", "-").padStart(25)
append(patchName)

// Add description if flag is set.
Expand Down
5 changes: 2 additions & 3 deletions src/main/kotlin/app/revanced/utils/patcher/Patcher.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package app.revanced.utils.patcher

import app.revanced.cli.command.MainCommand
import app.revanced.cli.command.MainCommand.args
import app.revanced.cli.command.MainCommand.logger
import app.revanced.cli.command.PatchList
Expand All @@ -18,8 +17,8 @@ fun Patcher.addPatchesFiltered(allPatches: PatchList) {
val includedPatches = mutableListOf<Class<out Patch<Context>>>()
allPatches.forEach patchLoop@{ patch ->
val compatiblePackages = patch.compatiblePackages
val patchName = patch.patchName
val args = MainCommand.args.patchArgs?.patchingArgs!!
val patchName = patch.patchName.lowercase().replace(" ", "-")
val args = args.patchArgs?.patchingArgs!!

val prefix = "Skipping $patchName"

Expand Down

0 comments on commit f6c221d

Please sign in to comment.