From 885fcb3f6e3179d42d1247b03fb57ccf33d1e82c Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Sat, 18 Dec 2021 11:13:24 -0800 Subject: [PATCH] fix: expose bare jq/jq.exe binary (#20) --- lib/private/jq_toolchain.bzl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/private/jq_toolchain.bzl b/lib/private/jq_toolchain.bzl index 5ae1036..5f6b61f 100644 --- a/lib/private/jq_toolchain.bzl +++ b/lib/private/jq_toolchain.bzl @@ -178,11 +178,9 @@ def _jq_platform_repo_impl(repository_ctx): ) build_content = """#Generated by lib/repositories.bzl load("@aspect_bazel_lib//lib/private:jq_toolchain.bzl", "jq_toolchain") -jq_toolchain(name = "jq_toolchain", bin = select({ - "@bazel_tools//src/conditions:host_windows": ":jq.exe", - "//conditions:default": ":jq", -}), visibility = ["//visibility:public"]) -""" +exports_files(["{0}"]) +jq_toolchain(name = "jq_toolchain", bin = "{0}", visibility = ["//visibility:public"]) +""".format("jq.exe" if is_windows else "jq") # Base BUILD file for this repository repository_ctx.file("BUILD.bazel", build_content)