Don't print deprecation warning if no arg is specified. Fixes #1041.

This commit is contained in:
Parker Moore 2013-05-07 13:10:29 +02:00
parent dde2d7c3f6
commit a0ad8a4031
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ module Jekyll
end
def self.no_subcommand(args)
if args.size == 0 || (args.first =~ /^--/ && !%w[--help --version].include?(args.first))
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)