summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data/repo
diff options
context:
space:
mode:
authorWalker Selby <git@walkerselby.com>2023-09-29 11:30:27 -0700
committerGitHub <noreply@github.com>2023-09-29 20:30:27 +0200
commit343d5d9cea12beaf7a8dfabda2f61ad940be592a (patch)
treeceb0a82790eaa1a1babfe4a2e05220378037a748 /src/main/java/at/hannibal2/skyhanni/data/repo
parentb364b6da62668ea44dfc23180fe70c13ec707804 (diff)
downloadskyhanni-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.kt12
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()