From de5a9a470cd2ec50c0ea37271c1cb556829ddfd7 Mon Sep 17 00:00:00 2001 From: timvisee Date: Sat, 1 Jun 2019 21:39:00 +0200 Subject: [PATCH] Return non-zero exit code when running ffsend with no arguments --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 1b1d400..fce1c17 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,6 +27,8 @@ mod progress; mod urlshorten; mod util; +use std::process; + use crate::action::debug::Debug; use crate::action::delete::Delete; use crate::action::download::Download; @@ -156,7 +158,7 @@ fn invoke_action(handler: &Handler) -> Result<(), Error> { } /// Print the main info, shown when no subcommands were supplied. -pub fn print_main_info() { +pub fn print_main_info() -> ! { // Get the name of the used executable let bin = bin_name(); @@ -172,4 +174,6 @@ pub fn print_main_info() { println!(); println!("To show all subcommands, features and other help:"); println!(" {}", highlight(&format!("{} help [SUBCOMMAND]", bin))); + + process::exit(1) }