Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
SanmerDev committed Jun 29, 2024
1 parent f5e37a0 commit 8f67599
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ data class ThrowableWrapper(
val original: Throwable
) : Parcelable {
companion object {
fun Throwable.warp() = ThrowableWrapper(this)
fun Throwable.wrap() = ThrowableWrapper(this)
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.sanmer.mrepo.impl

import dev.sanmer.mrepo.Platform
import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.warp
import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.wrap
import dev.sanmer.mrepo.impl.Shell.exec
import dev.sanmer.mrepo.stub.IInstallCallback
import dev.sanmer.mrepo.stub.IModuleOpsCallback
Expand Down Expand Up @@ -48,14 +48,14 @@ internal class APatchModuleManagerImpl : BaseModuleManagerImpl() {
private fun moduleOps(cmd: String, id: String, callback: IModuleOpsCallback?) {
val moduleDir = File(modulesDir, id)
if (!moduleDir.exists()) {
callback?.onFailure(id, FileNotFoundException(moduleDir.path).warp())
callback?.onFailure(id, FileNotFoundException(moduleDir.path).wrap())
return
}

cmd.exec().onSuccess {
callback?.onSuccess(id)
}.onFailure {
callback?.onFailure(id, it.warp())
callback?.onFailure(id, it.wrap())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package dev.sanmer.mrepo.impl

import dev.sanmer.mrepo.content.Module
import dev.sanmer.mrepo.content.State
import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.warp
import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.wrap
import dev.sanmer.mrepo.impl.Shell.exec
import dev.sanmer.mrepo.stub.IInstallCallback
import dev.sanmer.mrepo.stub.IModuleManager
Expand Down Expand Up @@ -148,7 +148,7 @@ internal abstract class BaseModuleManagerImpl : IModuleManager.Stub() {
val module = getModuleInfo(path)
callback.onSuccess(module)
}.onFailure {
callback.onFailure(it.warp())
callback.onFailure(it.wrap())
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.sanmer.mrepo.impl

import dev.sanmer.mrepo.Platform
import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.warp
import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.wrap
import dev.sanmer.mrepo.impl.Shell.exec
import dev.sanmer.mrepo.stub.IInstallCallback
import dev.sanmer.mrepo.stub.IModuleOpsCallback
Expand Down Expand Up @@ -48,14 +48,14 @@ internal class KernelSUModuleManagerImpl : BaseModuleManagerImpl() {
private fun moduleOps(cmd: String, id: String, callback: IModuleOpsCallback?) {
val moduleDir = File(modulesDir, id)
if (!moduleDir.exists()) {
callback?.onFailure(id, FileNotFoundException(moduleDir.path).warp())
callback?.onFailure(id, FileNotFoundException(moduleDir.path).wrap())
return
}

cmd.exec().onSuccess {
callback?.onSuccess(id)
}.onFailure {
callback?.onFailure(id, it.warp())
callback?.onFailure(id, it.wrap())
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.sanmer.mrepo.impl

import dev.sanmer.mrepo.Platform
import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.warp
import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.wrap
import dev.sanmer.mrepo.stub.IInstallCallback
import dev.sanmer.mrepo.stub.IModuleOpsCallback
import java.io.File
Expand Down Expand Up @@ -56,7 +56,7 @@ internal class MagiskModuleManagerImpl : BaseModuleManagerImpl() {
private fun moduleOps(tags: List<Tag>, id: String, callback: IModuleOpsCallback?) {
val moduleDir = File(modulesDir, id)
if (!moduleDir.exists()) {
callback?.onFailure(id, FileNotFoundException(moduleDir.path).warp())
callback?.onFailure(id, FileNotFoundException(moduleDir.path).wrap())
return
}

Expand All @@ -71,7 +71,7 @@ internal class MagiskModuleManagerImpl : BaseModuleManagerImpl() {
}.onSuccess {
callback?.onSuccess(id)
}.onFailure {
callback?.onFailure(id, it.warp())
callback?.onFailure(id, it.wrap())
}
}

Expand Down

0 comments on commit 8f67599

Please sign in to comment.