Skip to content

Commit 103279f

Browse files
aSemyhsz
authored andcommitted
use absolute paths for pluginVerifierDownloadDir and oldPluginVerifierDownloadDir
1 parent 21c565a commit 103279f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/main/kotlin/org/jetbrains/intellij/tasks/VerifyPluginConfigurationTask.kt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ abstract class VerifyPluginConfigurationTask @Inject constructor(
110110
val kotlinApiVersion = kotlinApiVersion.orNull?.let(Version::parse)
111111
val kotlinLanguageVersion = kotlinLanguageVersion.orNull?.let(Version::parse)
112112
val platformKotlinLanguageVersion = platformBuildVersion.let(::getPlatformKotlinVersion)
113-
val pluginVerifierDownloadDir = pluginVerifierDownloadDir.get()
114-
val oldPluginVerifierDownloadDir = providers.systemProperty("user.home").map { "$it/.pluginVerifier/ides" }.get()
113+
val pluginVerifierDownloadPath = pluginVerifierDownloadDir.get().let(Path::of).toAbsolutePath()
114+
val oldPluginVerifierDownloadPath = providers.systemProperty("user.home").map { "$it/.pluginVerifier/ides" }.get().let(Path::of).toAbsolutePath()
115115

116116
sequence {
117117
pluginXmlFiles.get().mapNotNull { parsePluginXml(it, context) }.forEach { plugin ->
@@ -148,10 +148,13 @@ abstract class VerifyPluginConfigurationTask @Inject constructor(
148148
if (kotlinPluginAvailable.get() && kotlinStdlibDefaultDependency.orNull == null) {
149149
yield("The dependency on the Kotlin Standard Library (stdlib) is automatically added when using the Gradle Kotlin plugin and may conflict with the version provided with the IntelliJ Platform, see: https://jb.gg/intellij-platform-kotlin-stdlib")
150150
}
151-
if (Path.of(oldPluginVerifierDownloadDir).run {
152-
toString() != pluginVerifierDownloadDir && exists() && listFiles().isNotEmpty()
153-
}) {
154-
yield("The Plugin Verifier download directory is set to $pluginVerifierDownloadDir, but downloaded IDEs were also found in $oldPluginVerifierDownloadDir, see: https://jb.gg/intellij-platform-plugin-verifier-old-download-dir")
151+
152+
if (
153+
pluginVerifierDownloadPath == oldPluginVerifierDownloadPath
154+
&& oldPluginVerifierDownloadPath.exists()
155+
&& oldPluginVerifierDownloadPath.listFiles().isNotEmpty()
156+
) {
157+
yield("The Plugin Verifier download directory is set to $pluginVerifierDownloadPath, but downloaded IDEs were also found in $oldPluginVerifierDownloadPath, see: https://jb.gg/intellij-platform-plugin-verifier-old-download-dir")
155158
}
156159
}.joinToString("\n") { "- $it" }.takeIf(String::isNotEmpty)?.let {
157160
warn(

0 commit comments

Comments
 (0)