mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 11:42:44 +08:00
feat: 支持更新指令
This commit is contained in:
parent
43f01c13b0
commit
88cb31c06e
9
main.py
9
main.py
|
@ -100,4 +100,13 @@ if __name__ == '__main__':
|
||||||
init_db()
|
init_db()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
elif len(sys.argv) > 1 and sys.argv[1] == 'update':
|
||||||
|
try:
|
||||||
|
from dulwich import porcelain
|
||||||
|
repo = porcelain.open('.')
|
||||||
|
porcelain.pull(repo)
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
print("dulwich模块未安装,请查看 https://github.com/RockChinQ/QChatGPT/issues/77")
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user