Merge branch 'lichang' into lite

This commit is contained in:
TsMask
2025-05-13 09:51:03 +08:00
16 changed files with 198 additions and 25 deletions

View File

@@ -651,7 +651,18 @@ func (r NeVersion) operateRun(sshClient *ssh.ConnSSH, preinput map[string]string
}
// 命令终止符后继续执行命令
suffix := strings.HasSuffix(outputStr, "~]# ") || strings.LastIndex(outputStr, "~# ") != -1 || strings.HasSuffix(outputStr, "~$ ")
// "~]# ":麒麟, "~]$ ":欧拉, "~# ":NXP, "~$ ":Ubuntu
suffixStr := []string{"~]# ", "~]$ ", "~# ", "~$ "}
suffix := false
for _, v := range suffixStr {
if strings.HasSuffix(outputStr, v) {
suffix = true
break
}
}
if !suffix {
suffix = strings.LastIndex(outputStr, "~# ") != -1
}
if len(cmdStrArr) > 0 && suffix {
if firstRead {
firstRead = false