From 599afa2ac9abc81c842c7eea4484efd44bd20e7b Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 18 Jan 2023 00:03:25 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E5=8A=A0=E5=85=A5=E8=AF=8A=E6=96=AD?= =?UTF-8?q?=E6=97=A5=E5=BF=97=20macOS=20=E7=AB=AF=20Tesseract=20OCR=20?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E5=90=8E=E4=B8=8D=E8=AF=86=E5=88=AB=20https:?= =?UTF-8?q?//github.com/siyuan-note/siyuan/issues/7107?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/util/tesseract.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/util/tesseract.go b/kernel/util/tesseract.go index 495b77740..2b319b2e3 100644 --- a/kernel/util/tesseract.go +++ b/kernel/util/tesseract.go @@ -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)