fix: 网元安装Para5G参数读取nil和终端终止符判断

This commit is contained in:
TsMask
2025-03-04 18:12:09 +08:00
parent 75c3a5bcf2
commit 27da69050d
2 changed files with 2 additions and 2 deletions

View File

@@ -648,7 +648,7 @@ func (r NeVersion) operateRun(sshClient *ssh.ConnSSH, preinput map[string]string
}
// 命令终止符后继续执行命令
suffix := strings.HasSuffix(outputStr, "~]# ") || strings.HasSuffix(outputStr, "~$ ")
suffix := strings.HasSuffix(outputStr, "~]# ") || strings.LastIndex(outputStr, "~# ") != -1 || strings.HasSuffix(outputStr, "~$ ")
if len(cmdStrArr) > 0 && suffix {
if firstRead {
firstRead = false