Skip to content

Commit d45d340

Browse files
Only log not found warning if not found (#133)
We should only log if the file does not actually exist
1 parent ed0555b commit d45d340

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cli/src/main/kotlin/com/bazel_diff/hash/SourceFileHasher.kt

+4-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ class SourceFileHasher : KoinComponent {
4545
} else {
4646
val absoluteFilePath = Paths.get(workingDirectory.toString(), filenamePath)
4747
val file = absoluteFilePath.toFile()
48-
if (file.exists() && file.isFile) {
49-
putFile(file)
48+
if (file.exists()) {
49+
if (file.isFile) {
50+
putFile(file)
51+
}
5052
} else {
5153
logger.w { "File $absoluteFilePath not found" }
5254
}

0 commit comments

Comments
 (0)