fix: 在 fetchSelf 函数中添加日志记录,以捕获 parseSystemInfo 失败时的错误信息
This commit is contained in:
parent
63fa995bdf
commit
84b6d0a9e3
@ -2,6 +2,7 @@ package fetchself
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
@ -91,6 +92,7 @@ func fetchSelf(msg model.Message) (reply model.Reply) {
|
||||
if _, err := exec.LookPath(cmd); err == nil {
|
||||
info, err := parseSystemInfo(cmd)
|
||||
if err != nil {
|
||||
log.Println("parseSystemInfo failed", err)
|
||||
return
|
||||
}
|
||||
reply.FromMsg = msg
|
||||
|
Loading…
x
Reference in New Issue
Block a user