resolve theme root before sanitizing

This commit is contained in:
Ben Balter 2016-07-28 15:12:31 -04:00
parent 2351ef6bbe
commit 8b69c6f0b5
1 changed files with 5 additions and 1 deletions

View File

@ -10,7 +10,11 @@ module Jekyll
end
def root
@root ||= gemspec.full_gem_path
# Must use File.realpath to resolve symlinks created by rbenv
# Otherwise, Jekyll.sanitized path with prepend the unresolved root
@root ||= File.realpath(gemspec.full_gem_path)
rescue Errno::ENOENT, Errno::EACCES, Errno::ELOOP
nil
end
def includes_path