Skip to content

Commit

Permalink
Add some comments
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Thornton <art27@cantab.net>
  • Loading branch information
zeripath committed Mar 5, 2022
1 parent 01d1fa6 commit dd9e22a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/git/repo_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ func (c *CheckAttributeReader) Run() error {
return nil
},
})
if err != nil && c.ctx.Err() != err && err.Error() != "signal: killed" {
if err != nil && // If there is an error we need to return but:
c.ctx.Err() != err && // 1. We should not pass up error due to the context being cancelled
err.Error() != "signal: killed" { // 2. We should not pass up errors due to the program being killed
return fmt.Errorf("failed to run attr-check. Error: %w\nStderr: %s", err, stdErr.String())
}
return nil
Expand Down

0 comments on commit dd9e22a

Please sign in to comment.