mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 09:18:11 -05:00
Use relative_path in error message instead of path
This commit is contained in:
@@ -65,7 +65,7 @@ module Jekyll
|
||||
self.date = Time.parse(data["date"].to_s)
|
||||
rescue ArgumentError
|
||||
path = File.join(@dir || "", name)
|
||||
msg = "Post '#{path}' does not have a valid date in the YAML front matter.\n"
|
||||
msg = "Post '#{relative_path}' does not have a valid date in the YAML front matter.\n"
|
||||
msg << "Fix the date, or exclude the file or directory from being processed"
|
||||
raise Errors::FatalException.new(msg)
|
||||
end
|
||||
@@ -173,7 +173,7 @@ module Jekyll
|
||||
self.ext = ext
|
||||
rescue ArgumentError
|
||||
path = File.join(@dir || "", name)
|
||||
msg = "Post '#{path}' does not have a valid date.\n"
|
||||
msg = "Post '#{relative_path}' does not have a valid date.\n"
|
||||
msg << "Fix the date, or exclude the file or directory from being processed"
|
||||
raise Errors::FatalException.new(msg)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user