From 4786cfcb5e2115bc593f76453f36ba5749bf6092 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 9 Nov 2013 15:45:41 -0500 Subject: [PATCH] If no args are given, then list possible importers. --- bin/jekyll | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/jekyll b/bin/jekyll index 977f72f2..b8bfe35e 100755 --- a/bin/jekyll +++ b/bin/jekyll @@ -118,10 +118,11 @@ Mercenary.program(:jekyll) do |p| p.command(:import) do |c| c.syntax 'jekyll import [options]' c.description 'Import your old blog to Jekyll' + importers = [] begin require 'jekyll-import' - JekyllImport.add_importer_commands(c) + importers = JekyllImport.add_importer_commands(c) rescue LoadError end @@ -131,6 +132,11 @@ Mercenary.program(:jekyll) do |p| msg += "* Please see the documentation at http://jekyllrb.com/docs/migrations/ for instructions.\n" abort msg end + if args.empty? + Jekyll.logger.warn "You must specify an importer." + Jekyll.logger.info "Valid options are:" + importers.each { |i| Jekyll.logger.info "*", "#{i}" } + end end end end