From c680a11d9e3115221de5f8faf999d6e457651426 Mon Sep 17 00:00:00 2001 From: JMARyA Date: Thu, 10 Apr 2025 10:42:54 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20fix=20secure=20boot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/install/security.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/install/security.rs b/src/install/security.rs index b4da29b..ff01ffc 100644 --- a/src/install/security.rs +++ b/src/install/security.rs @@ -52,10 +52,10 @@ pub fn setup_tpm_unlock(conf: &DriveConfig) { pub fn has_secure_boot() -> bool { let (stdout, _) = run_command_noerr(&["sbctl", "status"], None, false); let binding = stdout.lines().collect::>(); - let status = binding.get(1).unwrap(); - - if status.contains("Setup Mode") || status.contains("Enabled") { - return true; + if let Some(status) = binding.get(1) { + if status.contains("Setup Mode") || status.contains("Enabled") { + return true; + } } false