From ed20cb4f900459623bf39d0081a826f3a2939785 Mon Sep 17 00:00:00 2001 From: ashmaroli Date: Wed, 28 Feb 2018 03:59:05 +0530 Subject: [PATCH] Remind user to resolve conflict in `jekyll new` with `--force` (#6801) Merge pull request 6801 --- lib/jekyll/commands/new.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/commands/new.rb b/lib/jekyll/commands/new.rb index 3947ce43..b1230156 100644 --- a/lib/jekyll/commands/new.rb +++ b/lib/jekyll/commands/new.rb @@ -27,8 +27,9 @@ module Jekyll new_blog_path = File.expand_path(args.join(" "), Dir.pwd) FileUtils.mkdir_p new_blog_path if preserve_source_location?(new_blog_path, options) - Jekyll.logger.abort_with "Conflict:", - "#{new_blog_path} exists and is not empty." + Jekyll.logger.error "Conflict:", "#{new_blog_path} exists and is not empty." + Jekyll.logger.abort_with "", "Ensure #{new_blog_path} is empty or else " \ + "try again with `--force` to proceed and overwrite any files." end if options["blank"]