--help added as a proper option.

master
Luka Vandervelden 2019-08-13 13:23:57 +02:00
parent dff5e01b0c
commit 46f2c4b0cf
1 changed files with 5 additions and 0 deletions

View File

@ -37,6 +37,11 @@ OptionParser.parse! do |parser|
do_not_clean = true
}
parser.on("-h", "--help", "Prints this help message.") {
puts parser
exit 0
}
parser.invalid_option do |flag|
STDERR.puts "ERROR: #{flag} is not a valid option."
STDERR.puts parser