From a0ad8a4031bbdd49f0fa77f12623181e29d0b4f9 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 7 May 2013 13:10:29 +0200 Subject: [PATCH] Don't print deprecation warning if no arg is specified. Fixes #1041. --- lib/jekyll/deprecator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/deprecator.rb b/lib/jekyll/deprecator.rb index 13871300..4be93480 100644 --- a/lib/jekyll/deprecator.rb +++ b/lib/jekyll/deprecator.rb @@ -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)