specify kag_config.yaml dumping encoding and newline

This commit is contained in:
huaidong.xhd 2025-06-06 16:51:16 +08:00
parent 9d80d184da
commit 72836d2385

View File

@ -80,7 +80,7 @@ def _render_template(namespace: str, tmpl: str, **kwargs):
project_id = kwargs.get("id", None)
config["project"]["id"] = project_id
config_file_path = project_dir.resolve() / "kag_config.yaml"
with open(config_file_path, "w") as config_file:
with open(config_file_path, "w", encoding="utf-8", newline="\n") as config_file:
yaml.dump(config, config_file)
return project_dir