Skip to content

Commit 1052baa

Browse files
muhammadnnpdgm
authored andcommitted
invert the file check logic
1 parent c62dad7 commit 1052baa

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

internal/exporter.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,13 @@ func (exporter *Exporter) collectMatchingPaths(pattern string, format certificat
268268
continue
269269
}
270270
} else {
271-
if strings.HasSuffix(file.Name(), ".key") {
272-
continue
273-
}
274-
275-
format = certificateFormatPEM
271+
if strings.HasSuffix(file.Name(), ".crt") ||
272+
strings.HasSuffix(file.Name(), ".pem") ||
273+
strings.HasSuffix(file.Name(), ".cert") {
274+
format = certificateFormatPEM
275+
} else {
276+
continue
277+
}
276278
}
277279

278280
output = append(output, &certificateRef{

0 commit comments

Comments
 (0)