diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 08f2ae8..4414222 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -461,7 +461,7 @@ def process_node(node): return node try: - with open(config_file, 'r') as f: + with open(config_file, 'r', encoding='utf-8') as f: config = json.load(f) # 处理 graphs 格式 @@ -486,8 +486,8 @@ try: config['global']['web_root'] = os.path.join(install_dir, 'web') config['global']['metrics_port'] = config['global'].get('metrics_port', 9000) - with open(config_file, 'w') as f: - json.dump(config, f, indent=2) + with open(config_file, 'w', encoding='utf-8') as f: + json.dump(config, f, indent=2, ensure_ascii=False) print(f"配置路径修复完成")