(*, path: Path, root_path: Path)
Removes the Bento GitHub Actions config file.

    Also cleans up parent directories recursively if they're left empty.
Removes the Bento GitHub Actions config file.
Removes the Bento GitHub Actions config file .
def _delete_gh_actions_config(*, path: Path, root_path: Path) -> None:
    """Removes the Bento GitHub Actions config file.

    Also cleans up parent directories recursively if they're left empty.
    """
    path.unlink()

    current_dir = path.parent
    while current_dir != root_path:
        try:
            current_dir.rmdir()
        except OSError:
            return  # directory not empty, cleanup done
        current_dir = current_dir.parent
def _delete_gh_actions_config ( * , path : Path , root_path : Path ) -> None : path . unlink ( ) current_dir = path . parent while current_dir != root_path : try : current_dir . rmdir ( ) except OSError : return # directory not empty, cleanup done current_dir = current_dir . parent