Skip to content

Commit

Permalink
feat(scancode): Try to to get more information on failures
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed Sep 26, 2024
1 parent 062f517 commit cd70325
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/scanners/scancode/src/main/kotlin/ScanCode.kt
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class ScanCode internal constructor(
return with(process) {
// Do not throw yet if the process exited with an error as some errors might turn out to be tolerable during
// parsing.
if (isError && stdout.isNotBlank()) logger.debug { stdout }
if (stderr.isNotBlank()) logger.debug { stderr }

resultFile.readText().also { resultFile.parentFile.safeDeleteRecursively() }
Expand Down
1 change: 1 addition & 0 deletions plugins/scanners/scancode/src/test/kotlin/ScanCodeTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class ScanCodeTest : WordSpec({

val process = mockk<ProcessCapture>()
every { process.isError } returns true
every { process.stdout } returns ""
every { process.stderr } returns "some error"

val scannerSpy = spyk(scanner)
Expand Down

0 comments on commit cd70325

Please sign in to comment.