def _get_env_var(rctx, name, default):
    """Find an environment variable in system. Doesn't %-escape the value!

    Args:
        rctx: rctx
        name: environment variable name
        default: default value to return if env var is not set in system

    Returns:
        The environment variable value or the default if it is not set
    """
    if name in rctx.os.environ:
        return rctx.os.environ[name]
    return default