Skip to content

Commit 92e13c2

Browse files
committed
chore(downloader): Only log about unpacking if something was unpacked
Talk about copying otherwise. Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
1 parent 5009713 commit 92e13c2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

downloader/src/main/kotlin/Downloader.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ class Downloader(private val config: DownloaderConfiguration) {
378378
} else {
379379
try {
380380
sourceArchive.unpackTryAllTypes(outputDirectory)
381+
382+
logger.info { "Successfully unpacked ${sourceArtifact.url} to '${outputDirectory.absolutePath}'..." }
381383
} catch (e: IOException) {
382384
logger.warn {
383385
"Could not unpack source artifact '${sourceArchive.absolutePath}': ${e.collectMessages()}"
@@ -389,14 +391,14 @@ class Downloader(private val config: DownloaderConfiguration) {
389391

390392
if (!isSourceCodeFile) throw DownloadException("The artifact does not seem to be a source code file", e)
391393

392-
logger.info { "Treating '${sourceArchive.absolutePath}' as a source code file." }
394+
logger.info {
395+
"Copying source code file '${sourceArchive.absolutePath}' to '${outputDirectory.absolutePath}'."
396+
}
393397

394398
sourceArchive.copyTo(outputDirectory / sourceArchive.name)
395399
}
396400
}
397401

398-
logger.info { "Successfully unpacked ${sourceArtifact.url} to '${outputDirectory.absolutePath}'..." }
399-
400402
tempDir?.safeDeleteRecursively()
401403
return ArtifactProvenance(sourceArtifact)
402404
}

0 commit comments

Comments
 (0)