From 1d72c01cf9749eec957425329119c9269d4dadbd Mon Sep 17 00:00:00 2001 From: Karol Jakusz-Gostomski Date: Thu, 16 Nov 2023 19:13:30 +0100 Subject: [PATCH] PR-001 - single file path handling bugfix --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index ad7ed50..c48af07 100644 --- a/main.go +++ b/main.go @@ -70,6 +70,10 @@ func main() { reports.Sort() } + if reports == nil { + os.Exit(1) + } + switch format { case "summary": reports.renderSummary() @@ -103,7 +107,7 @@ func listFiles(path string) []string { return nil }) } else { - appendAbsPath(fileInfo.Name()) + appendAbsPath(path) } return fileList