Some checks failed
Mark stable commit / test-unit (push) Has been cancelled
Mark stable commit / test-integration (push) Has been cancelled
Mark stable commit / test-env-virtual (push) Has been cancelled
Mark stable commit / test-env-nix (push) Has been cancelled
Mark stable commit / test-e2e (push) Has been cancelled
Mark stable commit / test-virgin-user (push) Has been cancelled
Mark stable commit / test-virgin-root (push) Has been cancelled
Mark stable commit / lint-shell (push) Has been cancelled
Mark stable commit / lint-python (push) Has been cancelled
Mark stable commit / mark-stable (push) Has been cancelled
11 lines
348 B
Python
11 lines
348 B
Python
import yaml
|
|
import os
|
|
|
|
|
|
def save_user_config(user_config, USER_CONFIG_PATH: str):
|
|
"""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}.")
|