mirror of
https://github.com/revanced/revanced-cli.git
synced 2024-08-24 16:20:48 +02:00
perf: Do not check, if the options file exists twice
This commit is contained in:
parent
64afc95a81
commit
e3c55507cf
@ -39,8 +39,9 @@ internal object OptionsCommand : Runnable {
|
||||
|
||||
override fun run() = try {
|
||||
PatchBundleLoader.Jar(*patchBundles).let { patches ->
|
||||
if (!filePath.exists() || overwrite) {
|
||||
if (update && filePath.exists()) patches.setOptions(filePath)
|
||||
val exists = filePath.exists()
|
||||
if (!exists || overwrite) {
|
||||
if (exists && update) patches.setOptions(filePath)
|
||||
|
||||
Options.serialize(patches, prettyPrint = true).let(filePath::writeText)
|
||||
} else throw OptionsFileAlreadyExistsException()
|
||||
|
Loading…
Reference in New Issue
Block a user