fix: core config apply not working

This commit is contained in:
DevChat Tester
2025-11-13 10:42:31 +08:00
parent 6bd74fd598
commit 9f3b910657

View File

@ -217,7 +217,7 @@ class CoreConfigManager:
# On Windows, try to execute directly (batch files, etc.) # On Windows, try to execute directly (batch files, etc.)
cmd = [str(hook_path), str(config_file_path)] cmd = [str(hook_path), str(config_file_path)]
print(f"🔧 Executing hook: {hook_path.name}") print(f"🔧 Executing hook: {hook_path}")
env = os.environ.copy() env = os.environ.copy()
env['PYTHONIOENCODING'] = 'utf-8' env['PYTHONIOENCODING'] = 'utf-8'
result = subprocess.run( result = subprocess.run(
@ -227,8 +227,9 @@ class CoreConfigManager:
text=True, text=True,
timeout=30, timeout=30,
encoding="utf-8", encoding="utf-8",
shell=True, # shell=True,
env=env, env=env,
# stdout=subprocess.PIPE, stderr=subprocess.STDOUT
) )
if result.returncode == 0: if result.returncode == 0:
@ -369,4 +370,4 @@ def deep_merge(dict1, dict2):
dict1[k].extend(v) # Example: extend lists. Adjust logic for other list merging needs. dict1[k].extend(v) # Example: extend lists. Adjust logic for other list merging needs.
else: else:
dict1[k] = v dict1[k] = v
return dict1 return dict1