Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-03-08 14:47:24 +0100
committerAnton Hvornum <anton.feeds@gmail.com>2021-03-08 14:47:24 +0100
commit775a26f738002ad124200716b68f92ebc9e91a5c (patch)
tree6323bf03dd492312c66e93a9b3299b1d75fc3e36
parentdd66aeda9afac70c087d7a399eec456510d4bca8 (diff)
Added a abort message
-rw-r--r--archinstall/lib/user_interaction.py5
-rw-r--r--examples/guided.py5
2 files changed, 7 insertions, 3 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index e20e98b1..01e3372c 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -90,10 +90,11 @@ def ask_to_configure_network():
def ask_for_disk_layout():
options = {
'keep-existing' : 'Keep existing partition layout and select which ones to use where.',
- 'format-all' : 'Format entire drive and setup a basic partition scheme.'
+ 'format-all' : 'Format entire drive and setup a basic partition scheme.',
+ 'abort' : 'abort'
}
- return generic_select(options.values(), "Found partitions on the selected drive, (select by number) what do you want to do: ")
+ return generic_select(options.values(), "Found partitions on the selected drive, (select by number) what you want to do: ")
def generic_select(options, input_text="Select one of the above by index or absolute value: ", sort=True):
"""
diff --git a/examples/guided.py b/examples/guided.py
index 2b49d88a..0077b505 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -114,7 +114,10 @@ if archinstall.arguments['harddrive'].has_partitions():
archinstall.log(f" {partition} (Filesystem not supported)", fg='red')
# We then ask what to do with the paritions.
- if (option := archinstall.ask_for_disk_layout()) == 'keep-existing':
+ if (option := archinstall.ask_for_disk_layout()) == 'abort':
+ archinstall.log(f"Safely aborting the installation. No changes to the disk or system has been made.")
+ exit(1)
+ elif option == 'keep-existing':
archinstall.arguments['harddrive'].keep_partitions = True
archinstall.log(f" ** You will now select which partitions to use by selecting mount points (inside the installation). **")