From 55e08aa5f9bc3417cea66ce7be9f5eba3dd9586e Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 27 Feb 2024 17:42:55 +0100 Subject: [PATCH] chore(sbt): Remove a superfluous `absoluteFile` conversion The `pomFile` already is absolute. Signed-off-by: Sebastian Schuberth --- plugins/package-managers/sbt/src/main/kotlin/Sbt.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/package-managers/sbt/src/main/kotlin/Sbt.kt b/plugins/package-managers/sbt/src/main/kotlin/Sbt.kt index f81c30f42b852..042fe33961ef9 100644 --- a/plugins/package-managers/sbt/src/main/kotlin/Sbt.kt +++ b/plugins/package-managers/sbt/src/main/kotlin/Sbt.kt @@ -238,7 +238,7 @@ class Sbt( } private fun moveGeneratedPom(pomFile: File): Result { - val targetDirParent = pomFile.absoluteFile.parentFile.searchUpwardsForSubdirectory("target") + val targetDirParent = pomFile.parentFile.searchUpwardsForSubdirectory("target") ?: return Result.failure(IllegalArgumentException("No target subdirectory found for '$pomFile'.")) val targetFilename = pomFile.relativeTo(targetDirParent).invariantSeparatorsPath.replace('/', '-') val targetFile = targetDirParent.resolve(targetFilename)