Skip to content

Commit f8e75bd

Browse files
committed
Enable expert mode prompt only in dev builds by default.
Signed-off-by: Hector Martin <[email protected]>
1 parent d2affb8 commit f8e75bd

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

scripts/bootstrap-dev.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export INSTALLER_BASE=https://cdn.asahilinux.org/installer-dev
1212
export INSTALLER_DATA=https://github.com/AsahiLinux/asahi-installer/raw/main/data/installer_data.json
1313
export REPO_BASE=https://cdn.asahilinux.org
1414

15+
export EXPERT=1
16+
1517
#TMP="$(mktemp -d)"
1618
TMP=/tmp/asahi-install
1719

scripts/bootstrap.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export INSTALLER_DATA=http://localhost:5000/data/installer_data.json
1212
export REPO_BASE=https://cdn.asahilinux.org
1313
PKG=installer.tar.gz
1414

15+
export EXPERT=1
16+
1517
#TMP="$(mktemp -d)"
1618
TMP=/tmp/asahi-install
1719

src/main.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -844,12 +844,15 @@ def main(self):
844844
p_question("Press enter to continue.")
845845
self.input()
846846
print()
847-
p_message("By default, this installer will hide certain advanced options that")
848-
p_message("are only useful for Asahi Linux developers. You can enable expert mode")
849-
p_message("to show them. Do not enable this unless you know what you are doing.")
850-
p_message("Please do not file bugs if things go wrong in expert mode.")
851-
self.expert = self.yesno("Enable expert mode?")
852-
print()
847+
848+
self.expert = False
849+
if os.environ.get("EXPERT", None):
850+
p_message("By default, this installer will hide certain advanced options that")
851+
p_message("are only useful for Asahi Linux developers. You can enable expert mode")
852+
p_message("to show them. Do not enable this unless you know what you are doing.")
853+
p_message("Please do not file bugs if things go wrong in expert mode.")
854+
self.expert = self.yesno("Enable expert mode?")
855+
print()
853856

854857
p_progress("Collecting system information...")
855858
self.sysinfo = system.SystemInfo()

0 commit comments

Comments
 (0)