From eb8f45952531394875e5911b89ae013fe61f9171 Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Thu, 27 May 2021 22:24:09 -0400 Subject: Write user configuration JSON to a file in logs directory --- examples/guided.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'examples/guided.py') diff --git a/examples/guided.py b/examples/guided.py index a43fc9b1..bad9b625 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -258,7 +258,10 @@ def perform_installation_steps(): print() print('This is your chosen configuration:') archinstall.log("-- Guided template chosen (with below config) --", level=logging.DEBUG) - archinstall.log(json.dumps(archinstall.arguments, indent=4, sort_keys=True, cls=archinstall.JSON), level=logging.INFO) + user_configuration = json.dumps(archinstall.arguments, indent=4, sort_keys=True, cls=archinstall.JSON) + archinstall.log(user_configuration, level=logging.INFO) + with open("/var/log/archinstall/user_configuration.json") as config_file: + config_file.write(user_configuration) print() if not archinstall.arguments.get('silent'): -- cgit v1.2.3-70-g09d2