mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
git: fix error wrapping to ensure internal errors are propogated
Also, tidy up the error printing, so that now we always print out the "current commit information was not captured by the build" message, instead of just for not locating the git binary. Before: WARNING: buildx: git was not found in the system. Current commit information was not captured by the build After: WARNING: current commit information was not captured by the build: git was not found in the system: <error message> Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
@ -737,7 +737,7 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
|
||||
hasMobyDriver := false
|
||||
gitattrs, err := getGitAttributes(ctx, opt.Inputs.ContextPath, opt.Inputs.DockerfilePath)
|
||||
if err != nil {
|
||||
logrus.Warn(err)
|
||||
logrus.WithError(err).Warn("current commit information was not captured by the build")
|
||||
}
|
||||
for i, np := range m[k] {
|
||||
node := nodes[np.driverIndex]
|
||||
|
Reference in New Issue
Block a user