From edda52e857df05b1e0bec656edc706a0c995a339 Mon Sep 17 00:00:00 2001 From: able Date: Sun, 5 May 2024 05:52:49 -0500 Subject: [PATCH] Make repbuild safe(er) again. --- repbuild/src/main.rs | 6 ++++-- sysdata/system_config.toml | 5 ----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/repbuild/src/main.rs b/repbuild/src/main.rs index d9aceea88..dfc601612 100644 --- a/repbuild/src/main.rs +++ b/repbuild/src/main.rs @@ -217,8 +217,10 @@ TERM_BACKDROP={} for (key, value) in modules.into_iter() { if value.is_table() { - let path = value.get("path").unwrap(); - let cmd_line = value.get("cmd_line").unwrap(); + let path = value.get("path").expect("You must have `path` as a value"); + let default_value = Value::String("".into()); + let cmd_line = value.get("cmd_line").unwrap_or(&default_value); + let a = format!( " MODULE_PATH={} MODULE_CMDLINE={}\n\n", diff --git a/sysdata/system_config.toml b/sysdata/system_config.toml index f6ddc760a..312a43b42 100644 --- a/sysdata/system_config.toml +++ b/sysdata/system_config.toml @@ -19,19 +19,15 @@ resolution = "1024x768x24" [boot.limine.ableos.modules] [boot.limine.ableos.modules.failure] path = "boot:///failure.hbf" -cmd_line = "" [boot.limine.ableos.modules.ecall] path = "boot:///ecall.hbf" -cmd_line = "" [boot.limine.ableos.modules.sds_test] path = "boot:///sds_test.hbf" -cmd_line = "" [boot.limine.ableos.modules.main] path = "boot:///main.hbf" -cmd_line = "" [boot.limine.ableos.modules.keyboard_driver] path = "boot:///keyboard_driver.hbf" @@ -39,7 +35,6 @@ cmd_line = "arch=${ARCH}" [boot.limine.ableos.modules.vfs_test] path = "boot:///vfs_test.hbf" -cmd_line = "" [boot.limine.ableos.modules.limine_framebuffer_driver] path = "boot:///limine_framebuffer_driver.hbf"