Skip to content

Commit 3564940

Browse files
authored
fix(builtin): resolve vendored node/yarn from external repo (#2614)
Fixes #2019
1 parent 406dcb5 commit 3564940

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/node/node_repositories.bzl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,13 @@ def _prepare_node(repository_ctx):
422422
yarn_bin_label = ("%s/bin/yarn.js" % yarn_package) if not is_windows else ("%s/yarn.cmd" % yarn_package)
423423
yarn_script = "%s/bin/yarn.js" % yarn_path
424424

425+
# Ensure that the "vendored" binaries are resolved
426+
# Just requesting their path from the repository context is enough to eager-load them
427+
if repository_ctx.attr.vendored_node:
428+
repository_ctx.path(Label(node_bin_label))
429+
if repository_ctx.attr.vendored_yarn:
430+
repository_ctx.path(Label(yarn_bin_label))
431+
425432
entry_ext = ".cmd" if is_windows else ""
426433
node_entry = "bin/node%s" % entry_ext
427434
npm_entry = "bin/npm%s" % entry_ext

0 commit comments

Comments
 (0)