Silently ignores explicit `chef.cookbooks_path` configuration
pezra opened this issue · comments
@pezra in the past, Chef/Vagrant would complain if the "cookbooks" directory didn't exist or was empty. If this hasn't changed we can't append to the list and we still need to overwrite.
Right, so if the Vagrantfile doesn't explicitly specify a cookbooks directory, the berkshelf cookbooks dirctory should be the only one. OTOH, if the Vagrantfile does explicitly specify one or more cookbook directories those should be included also. #268 does exactly that.
@pezra unfortunately if the value is unset, Vagrant forces a default value for you: https://github.com/mitchellh/vagrant/blob/master/plugins/provisioners/chef/config/chef_zero.rb#L43-L47. This is why we need to overwrite.
@reset, et al, any thoughts on this issue?
I'm interested in this too. It seems in the current state, I can't include cookbooks from both my Berksfile and my chef.cookbooks_path
.
@dkinzer, i finally found the time to try your suggestion out and it worked! feels like a bit of a kludge but C'est la vie.
i still think it unfortunate that settings in the vagrant file are silently overridden. at the very least there should be an error telling the user that setting the cookbook path is not support.
@pezra, agreed. It's very disorienting when things that used to work break for no logical reason. That's life indeed! :)
+1
+1
+1
+1
+1
+1
+1
+1
+1