Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2022-01-14 12:54:22 +0100
committerAnton Hvornum <anton@hvornum.se>2022-01-14 12:54:22 +0100
commitda0c08e79ac79b0730ddc7f816c09b407bdc15f2 (patch)
treec16e37fd245650ad1a34bd39f60342623cce9945
parentf175ea8b7d9cec1ea2d835319361328bac2a6832 (diff)
Added in version history in the configuration
-rw-r--r--examples/guided.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 6f709b97..5ab87d9f 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -127,7 +127,11 @@ def save_user_configurations():
if archinstall.arguments.get('!encryption-password'):
user_credentials["!encryption-password"] = archinstall.arguments['!encryption-password']
- user_configuration = json.dumps({**archinstall.arguments, 'version' : archinstall.__version__} , indent=4, sort_keys=True, cls=archinstall.JSON)
+ user_configuration = json.dumps({
+ 'config_version': archinstall.__version__, # Tells us what version was used to generate the config
+ **archinstall.arguments, # __version__ will be overwritten by old version definition found in config
+ 'version': archinstall.__version__
+ } , indent=4, sort_keys=True, cls=archinstall.JSON)
with open("/var/log/archinstall/user_credentials.json", "w") as config_file:
config_file.write(json.dumps(user_credentials, indent=4, sort_keys=True, cls=archinstall.UNSAFE_JSON))