From 9dfed05c4bf9528c7ade830eb6b5e2143aef9838 Mon Sep 17 00:00:00 2001 From: Spenser Black Date: Tue, 15 Oct 2024 14:45:13 -0400 Subject: [PATCH] Catch any `os.Stat` error --- processor/processor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/processor/processor.go b/processor/processor.go index 16fdd6405..54dd45079 100644 --- a/processor/processor.go +++ b/processor/processor.go @@ -581,8 +581,8 @@ func Process() { fpath := filepath.Clean(f) s, err := os.Stat(fpath) - if os.IsNotExist(err) { - fmt.Println("file or directory does not exist: " + fpath) + if err != nil { + fmt.Println("file or directory could not be read: " + fpath) os.Exit(1) }