Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/profiles/sway.py
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2022-05-02 21:01:50 +1000
committerGitHub <noreply@github.com>2022-05-02 13:01:50 +0200
commitf00717ff6fd1c72d61b6928444fbf26a3f5e0e64 (patch)
tree0d37ec0b3f666d0316c7f97dce5c1cf3c81e832f /profiles/sway.py
parent48b1001734529c86d09c718d28e32cd6c23958bb (diff)
Fix #1106 (#1119)
* Fix #1106 * flake8 * flake8 Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'profiles/sway.py')
-rw-r--r--profiles/sway.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/profiles/sway.py b/profiles/sway.py
index 32d626d7..e9c71b79 100644
--- a/profiles/sway.py
+++ b/profiles/sway.py
@@ -18,7 +18,9 @@ __packages__ = [
def _check_driver() -> bool:
- if "nvidia" in archinstall.storage.get("gfx_driver_packages", None):
+ packages = archinstall.storage.get("gfx_driver_packages", [])
+
+ if packages and "nvidia" in packages:
prompt = 'The proprietary Nvidia driver is not supported by Sway. It is likely that you will run into issues, are you okay with that?'
choice = archinstall.Menu(prompt, ['yes', 'no'], default_option='no').run()
if choice == 'no':
@@ -34,11 +36,15 @@ def _prep_function(*args, **kwargs):
other code in this stage. So it's a safe way to ask the user
for more input before any other installer steps start.
"""
- archinstall.storage["gfx_driver_packages"] = archinstall.select_driver(force_ask=True)
- if not _check_driver():
- return _prep_function(args, kwargs)
+ driver = archinstall.select_driver()
- return True
+ if driver:
+ archinstall.storage["gfx_driver_packages"] = driver
+ if not _check_driver():
+ return _prep_function(args, kwargs)
+ return True
+
+ return False
# Ensures that this code only gets executed if executed