Skip to content

Commit

Permalink
add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
smonero committed Apr 14, 2024
1 parent ec7f526 commit 86843ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/vcs/provider/github/repo_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ func (g *RepoFetcher) Fetch(ctx context.Context, repo models.Repo, branch string
}

func (g *RepoFetcher) clone(ctx context.Context, repo models.Repo, branch string, sha string, options RepoFetcherOptions) (string, func(ctx context.Context, filePath string), error) {
// debug
options.SimplePath = false

destinationPath := g.generateDirPath(repo.Name)
// If simple path is enabled, we don't need a prefix and UUID
if options.SimplePath {
Expand All @@ -91,7 +94,7 @@ func (g *RepoFetcher) clone(ctx context.Context, repo models.Repo, branch string
}
_, err := g.run(ctx, cloneCmd, destinationPath)
if err != nil {
debugStr := fmt.Sprintf("clone cmd is %v, destination path is %s", cloneCmd, destinationPath)
debugStr := fmt.Sprintf("destination path is %s, repo is %v, sha is %v", destinationPath, repo, sha)
return "", nil, errors.Wrap(err, "failed to clone directory, debug info: "+debugStr)
}

Expand Down

0 comments on commit 86843ad

Please sign in to comment.