class ChefCLI::Command::GeneratorCommands::Cookbook

def have_delivery_config?

Returns:
  • (Boolean) -
def have_delivery_config?
  # delivery-cli's logic is to look recursively upward for
  # .delivery/cli.toml starting from pwd:
  # https://github.com/chef/delivery-cli/blob/22cbef3987ebd0aee98405b7e161a100edc87e49/src/delivery/config/mod.rs#L225-L247
  Pathname.pwd.ascend.any? { |path| path.join(".delivery/cli.toml").exist? }
end