voxpupuli / librarian-puppet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exclude target path from recursive copy

stefanbethke opened this issue · comments

I have a module that includes a complete control repo in example/, including a Puppetfile. This Puppetfile contains a reference to the module itself:

mod 'my_module',
  path: "../"
In kitchen, this works fine, but if I run librarian-puppet, I get this error message:
$ librarian-puppet  install
/Users/user/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/fileutils.rb:1362:in `copy': cannot copy directory /Users/user/working/my_module to itself /Users/user/working/my_module/examples/modules/my_module (ArgumentError)
	from /Users/user/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/fileutils.rb:471:in `block in copy_entry'
...

Since librarian-puppet will create it's modules directory under my_module/example/modules, copying the whole of my_module there can't possibly work. However, it's not really necessary to copy the example/modules dir as part of the module.

It would be cool if the target modules dir were excluded from the recursive copy.