Chef Zero Provisioner error due to licensing

When I ran chef provision, exists non-zero with some message about:

Chef Infra Client cannot execute without accepting the license

How do you handle this normally. The provisioner is broken without human operator intervention.

I found the solution would be to add an argument to accept the license. Otherwise, you get into the scenario that you need to run vagrant provision to install chef, but fail, and run it again after human operator fixes licensing. This way, you can void that hassle.

Vagrant.configure('2') do |config|
  config.vm.box = 'generic/ubuntu2204'
  config.vm.network 'forwarded_port', guest: 80, host: 8085

  config.vm.provision 'chef_zero' do |chef|
    chef.arguments = "--log_level debug --chef-license accept-silent"
    chef.cookbooks_path = "cookbooks"
    chef.add_recipe 'hello_web'
    chef.nodes_path = 'nodes'
  end
end