Skip to content

Commit dd9e22a

Browse files
committed
Add some comments
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 01d1fa6 commit dd9e22a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/git/repo_attribute.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ func (c *CheckAttributeReader) Run() error {
205205
return nil
206206
},
207207
})
208-
if err != nil && c.ctx.Err() != err && err.Error() != "signal: killed" {
208+
if err != nil && // If there is an error we need to return but:
209+
c.ctx.Err() != err && // 1. We should not pass up error due to the context being cancelled
210+
err.Error() != "signal: killed" { // 2. We should not pass up errors due to the program being killed
209211
return fmt.Errorf("failed to run attr-check. Error: %w\nStderr: %s", err, stdErr.String())
210212
}
211213
return nil

0 commit comments

Comments
 (0)