Add Git URL to clone error message
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
db493dbee1
commit
13874ce552
|
@ -77,7 +77,7 @@ func (c *CheckoutBranch) Checkout(ctx context.Context, path, url string, auth tr
|
||||||
Tags: git.NoTags,
|
Tags: git.NoTags,
|
||||||
})
|
})
|
||||||
if err != nil {
|
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()
|
head, err := repo.Head()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -108,7 +108,7 @@ func (c *CheckoutTag) Checkout(ctx context.Context, path, url string, auth trans
|
||||||
Tags: git.NoTags,
|
Tags: git.NoTags,
|
||||||
})
|
})
|
||||||
if err != nil {
|
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()
|
head, err := repo.Head()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -139,7 +139,7 @@ func (c *CheckoutCommit) Checkout(ctx context.Context, path, url string, auth tr
|
||||||
Tags: git.NoTags,
|
Tags: git.NoTags,
|
||||||
})
|
})
|
||||||
if err != nil {
|
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()
|
w, err := repo.Worktree()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -180,7 +180,7 @@ func (c *CheckoutSemVer) Checkout(ctx context.Context, path, url string, auth tr
|
||||||
Tags: git.AllTags,
|
Tags: git.AllTags,
|
||||||
})
|
})
|
||||||
if err != nil {
|
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()
|
repoTags, err := repo.Tags()
|
||||||
|
|
Loading…
Reference in New Issue