🎨 Improve Tesseract OCR installation check on macOS https://github.com/siyuan-note/siyuan/issues/7107
This commit is contained in:
parent
770c65f616
commit
48e8c9f86f
1 changed files with 6 additions and 0 deletions
|
@ -189,6 +189,12 @@ func getTesseractVer() (ret string) {
|
|||
cmd = exec.Command(TesseractBin, "--version")
|
||||
gulu.CmdAttr(cmd)
|
||||
data, err = cmd.CombinedOutput()
|
||||
if nil != err && strings.Contains(err.Error(), "executable file not found") {
|
||||
TesseractBin = "/opt/homebrew/bin/tesseract"
|
||||
cmd = exec.Command(TesseractBin, "--version")
|
||||
gulu.CmdAttr(cmd)
|
||||
data, err = cmd.CombinedOutput()
|
||||
}
|
||||
}
|
||||
}
|
||||
if nil != err {
|
||||
|
|
Loading…
Add table
Reference in a new issue