From 8399658acf5bebe8de4c50068cb39e7be7969619 Mon Sep 17 00:00:00 2001 From: tbs60 Date: Wed, 25 Sep 2024 11:51:29 +0800 Subject: [PATCH] fix: opt pump cache, issue: #296 --- .../booster/bk_dist/controller/pkg/manager/basic/utils.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/booster/bk_dist/controller/pkg/manager/basic/utils.go b/src/backend/booster/bk_dist/controller/pkg/manager/basic/utils.go index 96306798..354e9c25 100644 --- a/src/backend/booster/bk_dist/controller/pkg/manager/basic/utils.go +++ b/src/backend/booster/bk_dist/controller/pkg/manager/basic/utils.go @@ -271,7 +271,8 @@ func searchAS(exe string) []string { blog.Infof("basic: ready run cmd:[%s] for exe:%s", cmd, exe) sandbox := dcSyscall.Sandbox{} _, out, _, err := sandbox.ExecScriptsWithMessage(cmd) - if err != nil { + // 出错,或者只返回了as(没有完整路径,需要从系统得到) + if err != nil || strings.TrimSpace(string(out)) == "as" { blog.Warnf("basic: search as with out:%s,error:%+v", out, err) cmd = "which as"