This commit is contained in:
david 2024-03-01 23:44:25 +08:00
parent 1cc7445b58
commit 422e05c6f3
1 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"os/exec"
"path/filepath"
"strings"
"time"
@ -104,9 +105,9 @@ func getSrvStatus(srv string) PsTable {
func getCurrentVersion(srv string) string {
var data map[string]string
cmd := exec.Command(env.MeshEnv.Prefix+srv, "--json") // 替换为适合操作系统的命令
execbin := filepath.Join(env.MeshEnv.Prefix + srv)
cmd := exec.Command(execbin, "--json") // 替换为适合操作系统的命令
output, err := cmd.Output()
fmt.Println(string(output), err)
if err != nil {
return " - "
}