exit after status was returned when status argument was given on the command line

This commit is contained in:
2026-09-02 11:26:30 +02:00
parent 5e2fac03f4
commit 4c9b398b45
+1 -1
View File
@@ -45,7 +45,7 @@ fn main () {
pin_switch_off();
return;
},
"status" => println!("Inverter status: {}" , if pin_status() == 0 { "off" } else { "on" }),
"status" => { println!("Inverter status: {}" , if pin_status() == 0 { "off" } else { "on" }); std::process::exit(0); },
"test" => pin_test(config_file_path),
"config" => {
if args.len() > n + 1 { config_file_path = args[n + 1].as_str(); }