Skip to content

Commit

Permalink
hacking
Browse files Browse the repository at this point in the history
  • Loading branch information
thockin committed Jun 9, 2024
1 parent 12a7d9c commit 5ba4431
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3,059 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,9 @@ func main() {
updateSyncMetrics(metricKeyError, start)
if *flMaxFailures >= 0 && failCount >= *flMaxFailures {
// Exit after too many retries, maybe the error is not recoverable.
git.run.WithCallDepth(1).Run(ctx, git.root.String(), nil, "ls", "-lran")

Check failure on line 833 in main.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `(k8s.io/git-sync/pkg/cmd.Runner).Run` is not checked (errcheck)
git.run.WithCallDepth(1).Run(ctx, git.root.String(), nil, "git", "config", "--get", "safe.directory")

Check failure on line 834 in main.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `(k8s.io/git-sync/pkg/cmd.Runner).Run` is not checked (errcheck)
git.run.WithCallDepth(1).Run(ctx, git.root.String(), nil, "git", "config", "--list")

Check failure on line 835 in main.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `(k8s.io/git-sync/pkg/cmd.Runner).Run` is not checked (errcheck)
log.Error(err, "too many failures, aborting", "failCount", failCount)
os.Exit(1)
}
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func runWithStdin(ctx context.Context, log logintf, cwd string, env []string, st
return stdout, stderr, fmt.Errorf("Run(%s): %w: { stdout: %q, stderr: %q }", cmdStr, ctx.Err(), stdout, stderr)
}
if err != nil {
log.V(6).Error(err, "command result", "stdout", stdout, "stderr", stderr, "time", wallTime)
return stdout, stderr, fmt.Errorf("Run(%s): %w: { stdout: %q, stderr: %q }", cmdStr, err, stdout, stderr)
}
log.V(6).Info("command result", "stdout", stdout, "stderr", stderr, "time", wallTime)
Expand Down
Loading

0 comments on commit 5ba4431

Please sign in to comment.