Let Commander handle bad args after printing of deprecation warning. Fixes #1040.
This commit is contained in:
parent
7dccb6c996
commit
d0a9948eed
|
@ -20,14 +20,12 @@ module Jekyll
|
|||
if args.size > 0 && args.first =~ /^--/ && !%w[--help --version].include?(args.first)
|
||||
Jekyll::Logger.error "Deprecation:", "Jekyll now uses subcommands instead of just \
|
||||
switches. Run `jekyll help' to find out more."
|
||||
exit(1)
|
||||
end
|
||||
end
|
||||
|
||||
def self.deprecation_message(args, deprecated_argument, message)
|
||||
if args.include?(deprecated_argument)
|
||||
Jekyll::Logger.error "Deprecation:", message
|
||||
exit(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue