Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples/guided.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/guided.py')
-rw-r--r--examples/guided.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 266efbd4..647e78b1 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -7,7 +7,7 @@ import archinstall
from archinstall.lib.general import run_custom_user_commands
from archinstall.lib.hardware import *
from archinstall.lib.networking import check_mirror_reachable
-from archinstall.lib.profiles import Profile
+from archinstall.lib.profiles import Profile, is_desktop_profile
if archinstall.arguments.get('help'):
print("See `man archinstall` for help.")
@@ -212,13 +212,8 @@ def ask_user_questions():
# Ask about audio server selection if one is not already set
if not archinstall.arguments.get('audio', None):
- # only ask for audio server selection on a desktop profile
- if str(archinstall.arguments['profile']) == 'Profile(desktop)':
- archinstall.arguments['audio'] = archinstall.ask_for_audio_selection()
- else:
- # packages installed by a profile may depend on audio and something may get installed anyways, not much we can do about that.
- # we will not try to remove packages post-installation to not have audio, as that may cause multiple issues
- archinstall.arguments['audio'] = None
+ # The argument to ask_for_audio_selection lets the library know if it's a desktop profile
+ archinstall.arguments['audio'] = archinstall.ask_for_audio_selection(is_desktop_profile(archinstall.arguments['profile']))
# Ask for preferred kernel:
if not archinstall.arguments.get("kernels", None):
@@ -270,10 +265,10 @@ def perform_installation_steps():
with open("/var/log/archinstall/user_configuration.json", "w") as config_file:
config_file.write(user_configuration)
print()
-
+
if archinstall.arguments.get('dry_run'):
exit(0)
-
+
if not archinstall.arguments.get('silent'):
input('Press Enter to continue.')