Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/registermember' into registermember
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrancisc committed Aug 1, 2024
2 parents d9e599c + 15ba333 commit 069eab6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/cmd/adm/register_member.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ func NewRegisterMemberCmd() *cobra.Command {
}

defaultKubeConfigPath := ""
if home := homedir.HomeDir(); home != "" {

// first check if KUBECONFIG env variable is set
if kubeconfigPath := os.Getenv("KUBECONFIG"); kubeconfigPath != "" {

Check failure on line 84 in pkg/cmd/adm/register_member.go

View workflow job for this annotation

GitHub Actions / GolangCI Lint

undefined: os) (typecheck)

Check failure on line 84 in pkg/cmd/adm/register_member.go

View workflow job for this annotation

GitHub Actions / GolangCI Lint

undefined: os (typecheck)

Check failure on line 84 in pkg/cmd/adm/register_member.go

View workflow job for this annotation

GitHub Actions / GolangCI Lint

undefined: os) (typecheck)
defaultKubeConfigPath = kubeconfigPath
} else if home := homedir.HomeDir(); home != "" {
// use home kubeconfig if no KUBECONFIG env var was set
defaultKubeConfigPath = filepath.Join(home, ".kube", "config")
}

Expand Down

0 comments on commit 069eab6

Please sign in to comment.