mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 11:42:44 +08:00
feat: 生成配置文件后退出程序
This commit is contained in:
parent
696a0c57ee
commit
69a0fdc890
1
main.py
1
main.py
|
@ -66,6 +66,7 @@ if __name__ == '__main__':
|
||||||
if not os.path.exists('config.py'):
|
if not os.path.exists('config.py'):
|
||||||
shutil.copy('config-template.py', 'config.py')
|
shutil.copy('config-template.py', 'config.py')
|
||||||
print('请先在config.py中填写配置')
|
print('请先在config.py中填写配置')
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
if len(sys.argv) > 1 and sys.argv[1] == 'init_db':
|
if len(sys.argv) > 1 and sys.argv[1] == 'init_db':
|
||||||
init_db()
|
init_db()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user