Files
pkgmgr/pkgmgr/save_user_config.py

9 lines
344 B
Python
Raw Normal View History

2025-03-06 11:10:11 +01:00
import yaml
import os
2025-03-12 11:08:41 +01:00
def save_user_config(user_config,USER_CONFIG_PATH:str):
2025-03-06 11:10:11 +01:00
"""Save the user configuration to USER_CONFIG_PATH."""
os.makedirs(os.path.dirname(USER_CONFIG_PATH), exist_ok=True)
with open(USER_CONFIG_PATH, 'w') as f:
yaml.dump(user_config, f)
print(f"User configuration updated in {USER_CONFIG_PATH}.")