Cl8r::CLI::FileResolver
Centralized file resolution logic prioritizing .yaml files with fallback to .yml.
Class methods
Resolves an input cluster specification path. Rules:
- If explicit_path is provided and exists, return it.
- If explicit_path without extension exists with .yaml or .yml, return that.
- If explicit_path is nil or is default ("cluster.yaml" or "cluster.yml"):
- Check if "cluster.yaml" exists -> return "cluster.yaml"
- Check if "cluster.yml" exists -> return "cluster.yml"
- Default to "cluster.yaml"