Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
fix cloc error for gerrit repos (#91)
Browse files Browse the repository at this point in the history
Signed-off-by: Ayman <enkhalifapro@gmail.com>
Co-authored-by: Ayman <enkhalifapro@gmail.com>
  • Loading branch information
khalifapro and enkhalifapro authored Mar 20, 2023
1 parent d5e419a commit d281099
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -3791,6 +3791,11 @@ func (j *DSGit) getCloc(ctx *shared.Ctx, headSha string) error {
j.log.WithFields(logrus.Fields{"operation": "Sync"}).Errorf("error executing command: %v, error: %v, output: %s, output error: %s", cmdLine, err, sout, serr)
return err
}

if sout == "" {
return nil
}

r := make(map[string]clocResult)
err = jsoniter.Unmarshal([]byte(sout), &r)
if err != nil {
Expand Down

0 comments on commit d281099

Please sign in to comment.