Skip to content

Commit

Permalink
Corrected code so we return from the helper function and not
Browse files Browse the repository at this point in the history
using os.Exit().
  • Loading branch information
jonasbn committed Feb 26, 2023
1 parent d213357 commit 782499b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"flag"
"fmt"
"io/fs"
"log"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -172,7 +171,7 @@ func realMain() int {
ignoreObject, err = ignore.CompileIgnoreFile(config.Ignorefile)

if err != nil {
log.Fatalf("unable to read %s file", config.Ignorefile)
fmt.Printf("unable to read %s file", config.Ignorefile)
return 1
}
}
Expand Down

0 comments on commit 782499b

Please sign in to comment.