Skip to content

Commit 92a92a9

Browse files
committed
fix: unit test panic
1 parent c457f35 commit 92a92a9

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

pkg/devspace/build/registry/util.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ package registry
33
import (
44
"context"
55
"fmt"
6-
"github.com/loft-sh/devspace/pkg/devspace/build/builder"
7-
"github.com/loft-sh/devspace/pkg/devspace/build/builder/kaniko"
86
"io"
9-
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
107
"net/http"
118
"runtime"
129
"strings"
1310

11+
"github.com/loft-sh/devspace/pkg/devspace/build/builder"
12+
"github.com/loft-sh/devspace/pkg/devspace/build/builder/kaniko"
13+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
14+
1415
"github.com/docker/docker/pkg/jsonmessage"
1516
"github.com/google/go-containerregistry/pkg/authn"
1617
"github.com/google/go-containerregistry/pkg/name"
@@ -132,7 +133,7 @@ func UseLocalRegistry(client kubectl.Client, config *latest.Config, imageConfig
132133
}
133134

134135
// check if node architecture equals our architecture
135-
if runtime.GOARCH != "amd64" {
136+
if runtime.GOARCH != "amd64" && client.KubeClient() != nil {
136137
nodes, err := client.KubeClient().CoreV1().Nodes().List(context.Background(), metav1.ListOptions{})
137138
if err != nil {
138139
return false

0 commit comments

Comments
 (0)