chef-cli icon indicating copy to clipboard operation
chef-cli copied to clipboard

chef install should warn users if local cookbook isn't used

Open mhedgpeth opened this issue 8 years ago • 2 comments

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

mhedgpeth avatar Jun 01 '17 18:06 mhedgpeth

@thommay here you go, from the slack conversation on #policyfile

mhedgpeth avatar Jun 01 '17 18:06 mhedgpeth

related chef/chef-dk#1086 and chef/chef-dk#627

lamont-granquist avatar Jun 16 '17 16:06 lamont-granquist