import shutil
from pathlib import Path


def get_program_path(program):
    """Get full path to a program on system PATH."""
    path = shutil.which(program)
    if not program:
        raise OSError(f"{program} not found on system $PATH")
    return Path(path).resolve()