Fixed merge with new log output in lib/jekyll.rb
This commit is contained in:
parent
9eb79ff135
commit
5d8e012899
|
@ -133,16 +133,17 @@ module Jekyll
|
|||
config_file = File.join(source, '_config.yml')
|
||||
begin
|
||||
config = YAML.safe_load_file(config_file)
|
||||
raise "Invalid configuration file: #{config_file}" if !config.is_a?(Hash)
|
||||
$stdout.puts "Configuration file: #{config_file}"
|
||||
raise "Configuration file: (INVALID) #{config_file}" if !config.is_a?(Hash)
|
||||
$stdout.puts "Configuration file: #{config_file}"
|
||||
rescue SystemCallError
|
||||
# Errno:ENOENT = file not found
|
||||
$stderr.puts "Configuration file: none"
|
||||
config = {}
|
||||
rescue => err
|
||||
unless File.exists?(config_file)
|
||||
$stdout.puts "Configuration file: none"
|
||||
else
|
||||
$stderr.puts "WARNING: Could not read configuration. " +
|
||||
"Using defaults (and options)."
|
||||
$stderr.puts "\t" + err.to_s
|
||||
end
|
||||
$stderr.puts " " +
|
||||
"WARNING: Error reading configuration. " +
|
||||
"Using defaults (and options)."
|
||||
$stderr.puts "#{err}"
|
||||
config = {}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue