From bc0ddbd887c5b5eb1e6aec48f98de46964c36645 Mon Sep 17 00:00:00 2001 From: hahwul Date: Sat, 9 Sep 2023 01:22:39 +0900 Subject: [PATCH] Add missing_option handler in cli --- src/noir.cr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/noir.cr b/src/noir.cr index 0d42dc55..4518440d 100644 --- a/src/noir.cr +++ b/src/noir.cr @@ -67,6 +67,10 @@ OptionParser.parse do |parser| STDERR.puts parser exit(1) end + parser.missing_option do |flag| + STDERR.puts "ERROR: #{flag} is missing an argument." + exit(1) + end end if noir_options[:base] == ""