Skip to content

Commit 3ae9bff

Browse files
author
Alexander Matyushentsev
authored
fix: argocd CLI fails in core mode (argoproj#8270)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
1 parent 4c7651b commit 3ae9bff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/argocd/commands/headless/headless.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"k8s.io/apimachinery/pkg/util/runtime"
1717
"k8s.io/client-go/kubernetes"
1818
"k8s.io/client-go/tools/cache"
19+
"k8s.io/utils/pointer"
1920

2021
argoapi "github.com/argoproj/argo-cd/v2/pkg/apiclient"
2122
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
@@ -91,7 +92,7 @@ func InitCommand(cmd *cobra.Command, clientOpts *argoapi.ClientOptions, port *in
9192
log.SetLevel(log.ErrorLevel)
9293
os.Setenv(v1alpha1.EnvVarFakeInClusterConfig, "true")
9394
if address == nil {
94-
*address = "localhost"
95+
address = pointer.String("localhost")
9596
}
9697
if port == nil || *port == 0 {
9798
addr := fmt.Sprintf("%s:0", *address)

0 commit comments

Comments
 (0)