Skip to content

Commit

Permalink
Catch any os.Stat error
Browse files Browse the repository at this point in the history
  • Loading branch information
spenserblack committed Oct 15, 2024
1 parent 674e8c4 commit 9dd05c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 9dd05c8

Please sign in to comment.