exit after status was returned when status argument was given on the command line
This commit is contained in:
+1
-1
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user