Spaces:
Sleeping
Sleeping
Keldos
commited on
Commit
•
d65b955
1
Parent(s):
e8bde23
fix: 修正更新指令
Browse files- modules/utils.py +1 -1
modules/utils.py
CHANGED
@@ -594,7 +594,7 @@ def update_chuanhu():
|
|
594 |
git = os.environ.get('GIT', "git")
|
595 |
pip = os.environ.get('PIP', "pip")
|
596 |
try:
|
597 |
-
run(f"{git} fetch --all && {git} stash && {git} pull https://github.com/GaiZhenbiao/ChuanhuChatGPT.git main -f && {git} stash pop && {pip} install -r requirements.txt")
|
598 |
logging.info("Successfully updated")
|
599 |
status = '<span id="update-status" class="hideK">success</span>'
|
600 |
return gr.Markdown.update(value=i18n("更新成功,请重启本程序")+status)
|
|
|
594 |
git = os.environ.get('GIT', "git")
|
595 |
pip = os.environ.get('PIP', "pip")
|
596 |
try:
|
597 |
+
run(f"{git} fetch --all && ({git} pull https://github.com/GaiZhenbiao/ChuanhuChatGPT.git main -f || ({git} stash && {git} pull https://github.com/GaiZhenbiao/ChuanhuChatGPT.git main -f && {git} stash pop)) && {pip} install -r requirements.txt")
|
598 |
logging.info("Successfully updated")
|
599 |
status = '<span id="update-status" class="hideK">success</span>'
|
600 |
return gr.Markdown.update(value=i18n("更新成功,请重启本程序")+status)
|