added invalid option case to parser

This commit is contained in:
2021-12-29 01:56:47 +01:00
parent 9974cadb4e
commit dbf7c0a6a6

View File

@@ -18,6 +18,12 @@ module Kotatsu
puts VERSION
exit
end
parser.invalid_option do |flag|
STDERR.puts "ERROR! Not a valid option: #{flag}"
STDERR.puts "Use -h or --help for all available options"
exit(1)
end
end
webserv = HTTP::Server.new do |context|