This is my berksfile:
这是我的berksfile:
source 'https://supermarket.chef.io'
Dir[File.expand_path('../cookbooks', __FILE__)].each do |path|
cookbook(File.basename(path), path: path)
end
metadata
I should be able to do this https://www.sethvargo.com/berksfile-magic/ But berks just ignores that code snippet and I see no output from berks that it even tries to run it, it just says "Unable to find a solution for demands:"
我应该能够做到这一点https://www.sethvargo.com/berksfile-magic/但是berks只是忽略了那段代码片段而且我看不到berks的输出它甚至试图运行它,它只是说“无法找到需求解决方案:“
If I include them like this it works:
如果我像这样包含它们有效:
cookbook 'mycookbook', path: '../mycookbook'
1 个解决方案
#1
0
You probably meant Dir[File.expand_path('../cookbooks/*', __FILE__)]
but you can do this more easily if you are using ChefDK 2.x (i.e. a recent-ish Berkshelf) like so:
您可能意味着Dir [File.expand_path('../ cookbooks / *',__ FILE__)]但如果您使用ChefDK 2.x(即最近的Berkshelf),您可以更轻松地执行此操作:
source 'https://supermarket.chef.io/'
source chef_repo: '..'
metadata
#1
0
You probably meant Dir[File.expand_path('../cookbooks/*', __FILE__)]
but you can do this more easily if you are using ChefDK 2.x (i.e. a recent-ish Berkshelf) like so:
您可能意味着Dir [File.expand_path('../ cookbooks / *',__ FILE__)]但如果您使用ChefDK 2.x(即最近的Berkshelf),您可以更轻松地执行此操作:
source 'https://supermarket.chef.io/'
source chef_repo: '..'
metadata