Skip to content

Commit 5d6653b

Browse files
authored
Merge pull request #2495 from lizardruss/commands-no-context
Section commands such as devspace run [command] do not work when the k8s cluster is unavailable
2 parents 1ce408d + c80e6fb commit 5d6653b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pkg/devspace/config/remotecache/loader.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ package remotecache
33
import (
44
"context"
55
"encoding/base64"
6+
"errors"
7+
"syscall"
8+
69
"github.com/loft-sh/devspace/pkg/devspace/config/localcache"
710
"github.com/loft-sh/devspace/pkg/devspace/kubectl"
811
"github.com/loft-sh/devspace/pkg/util/encoding"
@@ -115,7 +118,7 @@ type cacheLoader struct {
115118
func (c *cacheLoader) Load(ctx context.Context, client kubectl.Client) (Cache, error) {
116119
remoteCache, err := NewCacheFromSecret(ctx, client, c.secretName)
117120
if err != nil {
118-
if !kerrors.IsNotFound(err) && !kerrors.IsForbidden(err) {
121+
if !kerrors.IsNotFound(err) && !kerrors.IsForbidden(err) && !errors.Is(err, syscall.ECONNREFUSED) {
119122
return nil, err
120123
}
121124

0 commit comments

Comments
 (0)