File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,10 +96,10 @@ func (c *Checkrr) Run() {
9696 for _ , path := range c .config .GetStringSlice ("checkpath" ) {
9797 c .Logger .WithFields (log.Fields {"startup" : true }).Debugf ("Path: %v" , path )
9898
99- filepath .WalkDir (path , func (path string , d os.DirEntry , err error ) error {
99+ err := filepath .WalkDir (path , func (path string , d os.DirEntry , err error ) error {
100100 if err != nil {
101- c .Logger .Fatalf ( err . Error () + " %v " , path )
102- return err
101+ c .Logger .Warnf ( "An error occurred walking the tree for %s. Please correct this before the next run. " , path )
102+ return err // we need to return here. we will fail all checks otherwise.
103103 }
104104 if ! d .IsDir () {
105105 var ignore bool = false
@@ -171,6 +171,9 @@ func (c *Checkrr) Run() {
171171 }
172172 return nil
173173 })
174+ if err != nil {
175+ c .Logger .WithFields (log.Fields {"run" : "failed" }).Errorf ("Error encountered in checkrr run: %s" , err )
176+ }
174177 }
175178
176179 c .notifications .Notify ("Checkrr Finished" , "A checkrr run has ended" , "endrun" , "" )
You can’t perform that action at this time.
0 commit comments