在本地开发环境保证 typst 二进制存在
This commit is contained in:
@ -15,7 +15,7 @@ from nonebot.adapters.onebot.v11.event import MessageEvent as OB11MessageEvent
|
|||||||
from nonebot.adapters.onebot.v11.bot import Bot as OB11Bot
|
from nonebot.adapters.onebot.v11.bot import Bot as OB11Bot
|
||||||
from nonebot.adapters.onebot.v11.message import Message as OB11Message
|
from nonebot.adapters.onebot.v11.message import Message as OB11Message
|
||||||
|
|
||||||
from konabot.common.artifact import ArtifactDepends, register_artifacts
|
from konabot.common.artifact import ArtifactDepends, ensure_artifact, register_artifacts
|
||||||
from konabot.common.longtask import DepLongTaskTarget
|
from konabot.common.longtask import DepLongTaskTarget
|
||||||
from konabot.common.path import BINARY_PATH, TMP_PATH
|
from konabot.common.path import BINARY_PATH, TMP_PATH
|
||||||
|
|
||||||
@ -153,6 +153,9 @@ async def _(
|
|||||||
msg: UniMsg,
|
msg: UniMsg,
|
||||||
target: DepLongTaskTarget,
|
target: DepLongTaskTarget,
|
||||||
):
|
):
|
||||||
|
# 对于本地机器,一般不会在应用启动时自动下载,这里再保证存在
|
||||||
|
await ensure_artifact(arti_typst_linux)
|
||||||
|
await ensure_artifact(arti_typst_windows)
|
||||||
if bin_path is None:
|
if bin_path is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user