Guard::Copy - :to must not include :from #13

Closed
safareli opened this Issue Apr 6, 2013 · 2 comments

2 participants

@safareli

https://github.com/marcisme/guard-copy/blob/master/lib/guard/copy.rb#L123

guard :copy, :from => 'assets', :to => '_site/assets' ,:verbose => true,:mkpath => true do
watch(%r{assets/js/.+})
end

i get this Guard::Copy - :to must not include :from

can you remove that check or make so that it checks if target starts with from directory

@marcisme marcisme added a commit that referenced this issue Apr 7, 2013
@marcisme relax :to validation
Check that targets contained in the `:to` parameter do not start with
the `:from` parameter. The validation used to fail on mere inclusion,
which was overly restrictive.

This change addresses issue #13.
68df054
@marcisme
Owner

Thanks for bringing this up.

I think that check was just intended to prevent copying into the source directory, so your proposed change seems fine. Let me know how this version works for you. You can try it out by using the following line in your Gemfile.

gem 'guard-copy', :git => 'git://github.com/marcisme/guard-copy.git'
@marcisme
Owner

This change is included in v0.0.8.

@marcisme marcisme closed this May 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment