Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bazel/integration/index.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ def _unwrap_label_keyed_mappings(ctx, dict, description):
# The nodejs toolchain now provides node and npm binaries, as long as node is the first file
# provided in the DefaultInfo files list, we continue as expected.
if name == "node":
if (len(files) != 2 or not files[0].short_path.endswith("bin/node")):
fail("Expected %s target %s to be an provide two files, of which the first is `node`")
# TODO: replace `> 2` with `!= 2` when migration from the old nodejs_toolchain
if (len(files) > 2 or not files[0].short_path.endswith("bin/node")):
fail("Expected %s target %s to be an provide up to two files, of which the first is `node`." % (description, target))

# For all non-node, we expect a single file or an executable which will only have one file.
elif len(files) != 1:
Expand Down