Skip to content

Commit e2b7b67

Browse files
committed
Fix detection of host resolution failure
Signed-off-by: Matej Vašek <[email protected]>
1 parent 0dad6dd commit e2b7b67

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/docker/pusher.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ func (n *Pusher) pushImage(ctx context.Context, f fn.Function, credentials Crede
201201
if err == nil {
202202
return digest, nil
203203
}
204-
if strings.Contains(err.Error(), "no such host") {
204+
errStr := err.Error()
205+
if strings.Contains(errStr, "no such host") || strings.Contains(errStr, "failure in name resolution") {
205206
// push with custom transport to be able to push into cluster private registries
206207
return n.push(ctx, f, credentials, output)
207208
}

0 commit comments

Comments
 (0)