From 4cc5c8ef2c263981917c7b891779af7a9ee45077 Mon Sep 17 00:00:00 2001 From: Pliosauroidea Date: Tue, 11 Mar 2025 18:37:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3.env.prod=E5=92=8C.env.dev?= =?UTF-8?q?=E7=9A=84=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bot.py b/bot.py index 471a98eaf..9a5d47291 100644 --- a/bot.py +++ b/bot.py @@ -51,15 +51,15 @@ def init_env(): with open(".env", "w") as f: f.write("ENVIRONMENT=prod") - # 检测.env.prod文件是否存在 - if not os.path.exists(".env.prod"): - logger.error("检测到.env.prod文件不存在") - shutil.copy("template.env", "./.env.prod") + # 检测.env.prod文件是否存在 + if not os.path.exists(".env.prod"): + logger.error("检测到.env.prod文件不存在") + shutil.copy("template.env", "./.env.prod") # 检测.env.dev文件是否存在,不存在的话直接复制生产环境配置 if not os.path.exists(".env.dev"): logger.error("检测到.env.dev文件不存在") - shutil.copy(".env.prod", "./.env.dev") + shutil.copy("template.env", "./.env.dev") # 首先加载基础环境变量.env if os.path.exists(".env"):