Skip to content

Commit 8bfee5e

Browse files
committed
build: simplify install folder resolution
1 parent a8bff3e commit 8bfee5e

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

build.gradle.kts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -202,21 +202,13 @@ tasks.register("cleanAll", Delete::class.java) {
202202

203203
private fun getPluginInstallDir(): Path {
204204
val userHome = System.getProperty("user.home").let { Path.of(it) }
205-
val toolboxCachesDir = when {
205+
val pluginsDir = when {
206206
SystemInfoRt.isWindows -> System.getenv("LOCALAPPDATA")?.let { Path.of(it) } ?: (userHome / "AppData" / "Local")
207207
// currently this is the location that TBA uses on Linux
208208
SystemInfoRt.isLinux -> System.getenv("XDG_DATA_HOME")?.let { Path.of(it) } ?: (userHome / ".local" / "share")
209209
SystemInfoRt.isMac -> userHome / "Library" / "Caches"
210210
else -> error("Unknown os")
211-
} / "JetBrains" / "Toolbox"
212-
213-
val pluginsDir = when {
214-
SystemInfoRt.isWindows ||
215-
SystemInfoRt.isLinux ||
216-
SystemInfoRt.isMac -> toolboxCachesDir
217-
218-
else -> error("Unknown os")
219-
} / "plugins"
211+
} / "JetBrains" / "Toolbox" / "plugins"
220212

221213
return pluginsDir / extension.id
222214
}

0 commit comments

Comments
 (0)