❯ chef --version
Chef Workstation version: 20.7.81
Chef Infra Client version: 16.2.73
Chef InSpec version: 4.21.1
Chef CLI version: 3.0.11
Test Kitchen version: 2.5.2
Cookstyle version: 6.9.0
# A name that describes what the system you're building with Chef does.
name 'testpolicy'
# Where to find external cookbooks:
default_source :chef_server, "http://127.0.0.1:8889/organizations/testorg"
# run_list: chef-client will run these recipes in the order specified.
run_list 'recipe[runstatus_handler]'
# Specify a custom source for a single cookbook:
cookbook 'runstatus_handler', '= 1.0.1'
Run
❯ chef install testpolicy.rb -c knife_local.rb
Expected Result:
It should have generated testpolicy.lock.json file
Version:
❯ chef --version Chef Workstation version: 20.7.81 Chef Infra Client version: 16.2.73 Chef InSpec version: 4.21.1 Chef CLI version: 3.0.11 Test Kitchen version: 2.5.2 Cookstyle version: 6.9.0
Environment:
Tried on my Mac
Scenario:
Chef install fails. After patching this commit: https://github.com/chef/chef/pull/10140.
Steps to Reproduce:
Started chef-zero:
❯ chef-zero --port 8889 --multi-org
Used following knife config:
Created org: ❯ knife opc org create testorg Test Org -c /tmp/knife_local.rb
Uploaded cookbook: ❯ knife cookbook upload runstatus_handler -c /tmp/knife_local.rb
Used following policyFile: ❯ cat testpolicy.rb
Run ❯ chef install testpolicy.rb -c knife_local.rb
Expected Result:
It should have generated
testpolicy.lock.json
fileActual Result:
It fails to do that
Possible Fix:
all_files
to above list ofFILE_TYPES
it worked fine for me