log the error object instead of the string message only

Co-authored-by: Nick Sieger <nicksieger@gmail.com>
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
Guillaume Lours 2022-10-18 17:34:16 +02:00 committed by GitHub
parent 18ce1f41b7
commit 3f0550f884
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,7 @@ func (s *composeService) getDrivers(ctx context.Context) ([]build.DriverInfo, er
}
if f == nil {
if f, err = driver.GetFactory(ng.Driver, true); f == nil || err != nil {
return nil, fmt.Errorf("failed to find buildx driver %q, error: %s", ng.Driver, err.Error())
return nil, fmt.Errorf("failed to find buildx driver %q, error: %w", ng.Driver, err)
}
}
} else {