chef-cli
chef-cli copied to clipboard
chef install should warn users if local cookbook isn't used
Description
If you have this Policyfile.rb in a cookbook:
name 'kitchen-cloudpassage'
default_source :supermarket, 'https://supermarket.chef.io'
run_list 'recipe[chef-vault::default]', 'recipe[mycookbook::default]'
But forget to add this line:
cookbook 'mycookbook', path: '.'
Then a chef install Policyfile.rb command will dutifully look to your supermarket for the mycookbook cookbook. This could get very confusing.
Suggestion: warn the user that they are NOT using the local cookbook (as defined in the metadata.rb that is located as a peer to the Policyfile.rb file.
ChefDK Version
Chef Development Kit Version: 1.3.43
Platform Version
Mac OSX
Replication Case
See above
Stacktrace
None
@thommay here you go, from the slack conversation on #policyfile
related chef/chef-dk#1086 and chef/chef-dk#627