mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 06:50:53 +00:00
fix(cli): add missing 'update' subcommand
- worker/update.py had run_update() but CLI never registered it - Users can now run: paperforge update
This commit is contained in:
parent
4d57d17975
commit
660204352f
1 changed files with 7 additions and 0 deletions
|
|
@ -214,6 +214,9 @@ def build_parser() -> argparse.ArgumentParser:
|
|||
# doctor
|
||||
sub.add_parser("doctor", help="Validate PaperForge Lite setup and configuration")
|
||||
|
||||
# update
|
||||
sub.add_parser("update", help="Update PaperForge Lite to the latest version")
|
||||
|
||||
return parser
|
||||
|
||||
|
||||
|
|
@ -337,6 +340,10 @@ def main(argv: list[str] | None = None) -> int:
|
|||
from paperforge.worker.status import run_doctor
|
||||
return run_doctor(vault)
|
||||
|
||||
if args.command == "update":
|
||||
from paperforge.worker.update import run_update
|
||||
return run_update(vault)
|
||||
|
||||
print(f"Error: unknown command {args.command}", file=sys.stderr)
|
||||
return 1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue