from pathlib import Path


def chart_yaml_path(chart_path: Path) -> Path:
    """
    Resolve the path to the Chart.yaml file,
    whether it is given or just the directory containing it.
    """
    if chart_path.is_dir():
        return chart_path / "Chart.yaml"
    else:
        return chart_path