Skip to content

Commit 38dcba9

Browse files
committed
fix decode command
1 parent 384a944 commit 38dcba9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

install/sealos.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,14 @@ func (s *SealosInstaller) decodeOutput(output []byte) {
9494
// 192.168.0.200:6443 --token 9vr73a.a8uxyaju799qwdjv --discovery-token-ca-cert-hash sha256:7c2e69131a36ae2a042a339b33381c6d0d43887e2de83720eff5359e26aec866 --experimental-control-plane --certificate-key f8902e114ef118304e561c3ecd4d0b543adc226b7a07f675f56564185ffe0c07
9595
func (s *SealosInstaller) decodeJoinCmd(cmd string) {
9696
stringSlice := strings.Split(cmd, " ")
97-
if len(stringSlice) == 10 {
97+
if len(stringSlice) == 8 {
9898
s.JoinToken = stringSlice[2]
9999
s.TokenCaCertHash = stringSlice[4]
100100
s.CertificateKey = stringSlice[7]
101101

102102
fmt.Println("sealos config %v", *s)
103103
} else {
104104
fmt.Println(" Error decode join command")
105+
panic(1)
105106
}
106107
}

0 commit comments

Comments
 (0)