mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 06:50:53 +00:00
fix: update pip installs from GitHub source instead of package index
This commit is contained in:
parent
6394043441
commit
6b567d004f
2 changed files with 3 additions and 2 deletions
|
|
@ -166,7 +166,7 @@ At minimum, back up these directories:
|
|||
|
||||
```bash
|
||||
# If installed via pip
|
||||
pip install --upgrade paperforge
|
||||
pip install --upgrade git+https://github.com/LLLin000/PaperForge.git
|
||||
|
||||
# If installed via git (editable install)
|
||||
cd "你的Vault路径"
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ from paperforge.worker._utils import (
|
|||
from paperforge.worker.status import GITHUB_REPO, GITHUB_ZIP, UPDATEABLE_PATHS
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
GITHUB_PIP_SOURCE = f"git+https://github.com/{GITHUB_REPO}.git"
|
||||
|
||||
|
||||
def protected_paths(vault: Path) -> set[str]:
|
||||
|
|
@ -146,7 +147,7 @@ def _update_via_pip(editable: bool = False) -> bool:
|
|||
cmd.extend(["-e", "."])
|
||||
else:
|
||||
cmd.append("--upgrade")
|
||||
cmd.append("paperforge")
|
||||
cmd.append(GITHUB_PIP_SOURCE)
|
||||
|
||||
logger.info("执行: %s", " ".join(cmd))
|
||||
r = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8")
|
||||
|
|
|
|||
Loading…
Reference in a new issue