pub fn before_hook(
cli: &Cli,
command_name: Option<&str>,
) -> Result<GlobalConfig>Expand description
Ported from createBeforeHook’s config-resolution half: if no
--config-file was given explicitly and the resolved subcommand needs
one, searches parent directories for caproni.yaml
(find_config_file).
§Errors
Returns an error if config-file discovery fails (no --config-file
given, and no caproni.yaml found in any parent directory).