Skip to content

Commit

Permalink
Make exec cfg check for //go stricter (#3867)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Feb 15, 2024
1 parent f0e46ec commit 2673072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/private/rules/go_bin_for_host.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def _ensure_target_cfg(ctx):
# A target is assumed to be built in the target configuration if it is neither in the exec nor
# the host configuration (the latter has been removed in Bazel 6). Since there is no API for
# this, use the output directory to determine the configuration, which is a common pattern.
if "-exec-" in ctx.bin_dir.path or "/host/" in ctx.bin_dir.path:
if "-exec" in ctx.bin_dir.path or "/host/" in ctx.bin_dir.path:
fail("//go is only meant to be used with 'bazel run', not as a tool. " +
"If you need to use it as a tool (e.g. in a genrule), please " +
"open an issue at " +
Expand Down

0 comments on commit 2673072

Please sign in to comment.