Merge pull request #170 from fluxcd/clone-error

Add Git URL to clone error message
This commit is contained in:
Stefan Prodan 2020-10-16 16:32:32 +03:00 committed by GitHub
commit 13e41aa332
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ func (c *CheckoutBranch) Checkout(ctx context.Context, path, url string, auth tr
Tags: git.NoTags,
})
if err != nil {
return nil, "", fmt.Errorf("git clone error: %w", err)
return nil, "", fmt.Errorf("unable to clone '%s', error: %w", url, err)
}
head, err := repo.Head()
if err != nil {
@ -108,7 +108,7 @@ func (c *CheckoutTag) Checkout(ctx context.Context, path, url string, auth trans
Tags: git.NoTags,
})
if err != nil {
return nil, "", fmt.Errorf("git clone error: %w", err)
return nil, "", fmt.Errorf("unable to clone '%s', error: %w", url, err)
}
head, err := repo.Head()
if err != nil {
@ -139,7 +139,7 @@ func (c *CheckoutCommit) Checkout(ctx context.Context, path, url string, auth tr
Tags: git.NoTags,
})
if err != nil {
return nil, "", fmt.Errorf("git clone error: %w", err)
return nil, "", fmt.Errorf("unable to clone '%s', error: %w", url, err)
}
w, err := repo.Worktree()
if err != nil {
@ -180,7 +180,7 @@ func (c *CheckoutSemVer) Checkout(ctx context.Context, path, url string, auth tr
Tags: git.AllTags,
})
if err != nil {
return nil, "", fmt.Errorf("git clone error: %w", err)
return nil, "", fmt.Errorf("unable to clone '%s', error: %w", url, err)
}
repoTags, err := repo.Tags()