diff --git a/.github/workflows/e2e-test.yaml b/.github/workflows/e2e-test.yaml index 3c11dfeb..53946bad 100644 --- a/.github/workflows/e2e-test.yaml +++ b/.github/workflows/e2e-test.yaml @@ -89,7 +89,7 @@ jobs: echo "********************************************************************************" echo "Running kubecm switch..." echo "********************************************************************************" - bin/kubecm s 3rd-kind + bin/kubecm s kind-3rd-kind echo "********************************************************************************" echo "Running kubecm delete..." echo "********************************************************************************" @@ -97,5 +97,5 @@ jobs: echo "********************************************************************************" echo "Running kubecm global flag --config..." echo "********************************************************************************" - bin/kubecm s 3rd-kind --config merge.config + bin/kubecm s kind-3rd-kind --config merge.config bin/kubecm list --config merge.config diff --git a/cmd/add.go b/cmd/add.go index d6c957f8..6097f8ca 100644 --- a/cmd/add.go +++ b/cmd/add.go @@ -116,7 +116,7 @@ func (kc *KubeConfigOption) handleContexts(oldConfig *clientcmdapi.Config) (*cli if len(kc.config.Contexts) > 1 { newName = fmt.Sprintf("%s-%s", kc.fileName, HashSufString(name)) } else { - newName = kc.fileName + newName = name } if checkContextName(newName, oldConfig) { nameConfirm := BoolUI(fmt.Sprintf("「%s」 Name already exists, do you want to rename it. (If you select `False`, this context will not be merged)", newName))