Add ? to preserve_source_location
This commit is contained in:
parent
00dd37d2e4
commit
fafacc43ca
|
@ -8,7 +8,7 @@ module Jekyll
|
||||||
|
|
||||||
new_blog_path = File.expand_path(args.join(" "), Dir.pwd)
|
new_blog_path = File.expand_path(args.join(" "), Dir.pwd)
|
||||||
FileUtils.mkdir_p new_blog_path
|
FileUtils.mkdir_p new_blog_path
|
||||||
if preserve_source_location(new_blog_path, options)
|
if preserve_source_location?(new_blog_path, options)
|
||||||
Jekyll::Stevenson.error "Conflict:", "#{new_blog_path} exists and is not empty."
|
Jekyll::Stevenson.error "Conflict:", "#{new_blog_path} exists and is not empty."
|
||||||
exit(1)
|
exit(1)
|
||||||
end
|
end
|
||||||
|
@ -33,8 +33,8 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def self.preserve_source_location(path, options)
|
def self.preserve_source_location?(path, options)
|
||||||
!options[:force] && !Dir["#{path}/**/*"].empty?
|
!options[:force] && !Dir["#{path}/**/*"].empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue