mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🐛 Pandoc is not initialized in some cases Fix https://github.com/siyuan-note/siyuan/issues/8533
This commit is contained in:
parent
e93c62e49f
commit
a515a4f992
7 changed files with 33 additions and 5 deletions
|
|
@ -19,7 +19,6 @@ package model
|
|||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"github.com/sashabaranov/go-openai"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
|
@ -35,6 +34,8 @@ import (
|
|||
"github.com/Xuanwo/go-locale"
|
||||
"github.com/dustin/go-humanize"
|
||||
"github.com/getsentry/sentry-go"
|
||||
"github.com/sashabaranov/go-openai"
|
||||
"github.com/siyuan-note/eventbus"
|
||||
"github.com/siyuan-note/filelock"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/conf"
|
||||
|
|
@ -892,3 +893,15 @@ func upgradeUserGuide() {
|
|||
index(boxID)
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
subscribeConfEvents()
|
||||
}
|
||||
|
||||
func subscribeConfEvents() {
|
||||
eventbus.Subscribe(util.EvtConfPandocInitialized, func() {
|
||||
logging.LogInfof("pandoc initialized, set pandoc bin to [%s]", util.PandocBinPath)
|
||||
Conf.Export.PandocBin = util.PandocBinPath
|
||||
Conf.Save()
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue