Fix missing error check of bufio.Scanner (#29882)
maybe more (cherry picked from commit 0e183d81fc5283f9d2047472de580e4f04a046c1)
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
@@ -390,6 +391,10 @@ func (c *Commit) GetSubModules() (*ObjectCache, error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
err = scanner.Err()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("scan: %w", err)
|
||||
}
|
||||
|
||||
return c.submoduleCache, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user