mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 06:50:53 +00:00
fix: include styles.css in package data; prevent Unicode crash on pip output
This commit is contained in:
parent
6df746d20c
commit
2329e82588
3 changed files with 5 additions and 4 deletions
|
|
@ -1,3 +1,3 @@
|
|||
"""paperforge — PaperForge package."""
|
||||
|
||||
__version__ = "1.4.9"
|
||||
__version__ = "1.4.10"
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ def _update_via_pip(editable: bool = False) -> bool:
|
|||
cmd.append(GITHUB_PIP_SOURCE)
|
||||
|
||||
logger.info("执行: %s", " ".join(cmd))
|
||||
r = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8")
|
||||
r = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", errors="replace")
|
||||
if r.returncode != 0:
|
||||
logger.error("pip 更新失败: %s", r.stderr)
|
||||
return False
|
||||
|
|
@ -176,12 +176,12 @@ def _update_via_git(vault: Path) -> bool:
|
|||
if not (vault / ".git").is_dir():
|
||||
logger.error("不是 git 仓库")
|
||||
return False
|
||||
r = subprocess.run(["git", "status", "--short"], cwd=vault, capture_output=True, text=True, encoding="utf-8")
|
||||
r = subprocess.run(["git", "status", "--short"], cwd=vault, capture_output=True, text=True, encoding="utf-8", errors="replace")
|
||||
if r.stdout.strip():
|
||||
logger.warning("有未提交的更改,请先提交或储藏")
|
||||
return False
|
||||
logger.info("执行 git pull...")
|
||||
r = subprocess.run(["git", "pull", "origin", "master"], cwd=vault, capture_output=True, text=True, encoding="utf-8")
|
||||
r = subprocess.run(["git", "pull", "origin", "master"], cwd=vault, capture_output=True, text=True, encoding="utf-8", errors="replace")
|
||||
if r.returncode != 0:
|
||||
logger.error("git pull 失败: %s", r.stderr)
|
||||
return False
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ paperforge = [
|
|||
"skills/literature-qa/chart-reading/*.md",
|
||||
"skills/literature-qa/chart-reading/*",
|
||||
"command_files/*.md",
|
||||
"plugin/*.css",
|
||||
"plugin/*.js",
|
||||
"plugin/*.json",
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue