expand_path on custom source directories. Fixes #1823

This commit is contained in:
Thomas Reynolds 2016-03-02 12:54:14 -08:00
parent 7b59f240d5
commit 737e6f5e64
2 changed files with 4 additions and 2 deletions

View file

@ -116,7 +116,8 @@ module Middleman
Contract Or[Symbol, HANDLER], Maybe[Hash] => HANDLER
def watch(type_or_handler, options={})
handler = if type_or_handler.is_a? Symbol
SourceWatcher.new(self, type_or_handler, options.delete(:path), options)
path = File.expand_path(options.delete(:path), app.root)
SourceWatcher.new(self, type_or_handler, path, options)
else
type_or_handler
end