Skip to content

Commit 3ff6e03

Browse files
committed
update
1 parent c9e2e64 commit 3ff6e03

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

package/nuitka_build/v2/main.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,10 @@ def main():
260260
dist_path.mkdir(parents=True, exist_ok=True) # 创建输出目录
261261
temp_uuid = uuid.uuid4().hex
262262
new_project_base_path = base_dir / temp_uuid
263-
264263

264+
# 替换 \ 为 /
265+
if True:
266+
config_path= base_dir / args.config.replace('\\','/')
265267

266268
# welcome message
267269
logging.info("=" * 50)
@@ -282,7 +284,7 @@ def main():
282284
logging.info(f"进程 PID: {os.getpid()}")
283285
logging.info(f"进程名称: {psutil.Process(os.getpid()).name()}")
284286
logging.info(f"是否具有管理员权限: {'True' if is_admin() else 'False'}")
285-
logging.info(f"配置文件路径: {args.config}")
287+
logging.info(f"配置文件路径: {config_path}")
286288
logging.info(f"日志输出路径: {log_output_path}")
287289

288290
# python 信息
@@ -311,8 +313,8 @@ def main():
311313
logging.info(f"输出目录: {dist_path}")
312314

313315
# 检查配置文件是否存在
314-
if not os.path.exists(args.config):
315-
logging.error(f"配置文件 {args.config} 不存在")
316+
if not os.path.exists(config_path):
317+
logging.error(f"配置文件 {config_path} 不存在")
316318
exit_program(1)
317319
# 检查默认配置文件是否存在
318320
if not os.path.exists(default_config_path):
@@ -322,7 +324,7 @@ def main():
322324

323325
# 读取配置文件
324326
try:
325-
with open(args.config, "r", encoding="utf-8") as f:
327+
with open(config_path, "r", encoding="utf-8") as f:
326328
config = yaml.safe_load(f)
327329
config_keys = config.keys()
328330
logging.info(f"读取配置文件成功")

0 commit comments

Comments
 (0)