Skip to content

Commit

Permalink
🐛 加入诊断日志 macOS 端 Tesseract OCR 安装后不识别 #7107
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jan 17, 2023
1 parent 1db58b5 commit 599afa2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kernel/util/tesseract.go
Expand Up @@ -137,14 +137,15 @@ func initTesseract() {
}

func getTesseractVer() (ret string) {
logging.LogInfof("checking tesseract-ocr [Container=%s]", Container)
if ContainerStd != Container {
return
}

logging.LogInfof("exec [tesseract --version]")
cmd := exec.Command("tesseract", "--version")
gulu.CmdAttr(cmd)
logging.LogInfof("os env [%s]", os.Environ())
logging.LogInfof("cmd env [%s]", cmd.Environ())
cmd.Env = os.Environ()
data, err := cmd.CombinedOutput()
if nil != err {
logging.LogErrorf("get tesseract version failed: %s", err)
Expand Down

0 comments on commit 599afa2

Please sign in to comment.