mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-04 02:17:42 +08:00
build: silently fail if git remote not found
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
eacecf657c
commit
4789d2219c
@ -78,9 +78,7 @@ func getGitAttributes(ctx context.Context, contextPath string, dockerfilePath st
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if rurl, err := gitc.RemoteURL(); err != nil {
|
if rurl, err := gitc.RemoteURL(); err == nil && rurl != "" {
|
||||||
return res, errors.Wrapf(err, "failed to get git remote url")
|
|
||||||
} else if rurl != "" {
|
|
||||||
if setGitLabels {
|
if setGitLabels {
|
||||||
res["label:"+specs.AnnotationSource] = rurl
|
res["label:"+specs.AnnotationSource] = rurl
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user