From 946350c88b46a92b7df60bc3c2895a22b7c3526d Mon Sep 17 00:00:00 2001 From: Phuntsok Drak-pa Date: Wed, 21 Nov 2018 01:59:02 +0100 Subject: [PATCH] help message instead of error in case of no input path --- src/main.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index c653ce2..642996c 100644 --- a/src/main.cc +++ b/src/main.cc @@ -82,7 +82,10 @@ std::tuple process_args(int t_argc, char *t_argv[]) { int main(int argc, char *argv[]) { const auto [input_path, output_path, compressing] = process_args(argc, argv); - assert(!input_path.empty()); + if(input_path.empty()) { + help(); + return 0; + } if (compressing) { compress(input_path, (output_path.empty()) ? nullptr : output_path.c_str()); } else {