diff options
| author | Walker Selby <git@walkerselby.com> | 2023-09-29 11:30:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-29 20:30:27 +0200 |
| commit | 343d5d9cea12beaf7a8dfabda2f61ad940be592a (patch) | |
| tree | ceb0a82790eaa1a1babfe4a2e05220378037a748 /src/main/java/at/hannibal2/skyhanni/data/repo | |
| parent | b364b6da62668ea44dfc23180fe70c13ec707804 (diff) | |
| download | skyhanni-343d5d9cea12beaf7a8dfabda2f61ad940be592a.tar.gz skyhanni-343d5d9cea12beaf7a8dfabda2f61ad940be592a.tar.bz2 skyhanni-343d5d9cea12beaf7a8dfabda2f61ad940be592a.zip | |
Random Code Cleanup (#516)
Sonar Lint for the win #516
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/repo')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt index d6302fa6e..21102c934 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt @@ -62,14 +62,12 @@ class RepoManager(private val configLocation: File) { e.printStackTrace() } if (latestRepoCommit == null || latestRepoCommit!!.isEmpty()) return@supplyAsync false - if (File(configLocation, "repo").exists()) { - if (currentCommitJSON != null && currentCommitJSON["sha"].asString == latestRepoCommit) { - if (command) { - LorenzUtils.chat("§e[SkyHanni] §7The repo is already up to date!") - atomicShouldManuallyReload.set(false) - } - return@supplyAsync false + if (File(configLocation, "repo").exists() && currentCommitJSON != null && currentCommitJSON["sha"].asString == latestRepoCommit) { + if (command) { + LorenzUtils.chat("§e[SkyHanni] §7The repo is already up to date!") + atomicShouldManuallyReload.set(false) } + return@supplyAsync false } RepoUtils.recursiveDelete(repoLocation) repoLocation.mkdirs() |
