From d37de5c8dfdcd10b4a2a48ae3498e954f4327c7e Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Mon, 4 Jan 2016 16:17:48 -0800 Subject: [PATCH] If the subcommand cannot be found, suggest the installation of a gem. --- bin/jekyll | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/jekyll b/bin/jekyll index 96e15727..43364b99 100755 --- a/bin/jekyll +++ b/bin/jekyll @@ -40,8 +40,11 @@ Mercenary.program(:jekyll) do |p| puts p abort else - unless p.has_command?(args.first) - Jekyll.logger.abort_with "Invalid command. Use --help for more information" + subcommand = args.first + unless p.has_command? subcommand + Jekyll.logger.abort_with "fatal: 'jekyll #{args.first}' could not" \ + " be found. You may need to install the jekyll-#{args.first} gem" \ + " or a related gem to be able to use this subcommand." end end end