Skip to content

Commit

Permalink
fix(builtin): resolve vendored node/yarn from external repo
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Apr 19, 2021
1 parent e710a6b commit 586b89e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/node/node_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,13 @@ def _prepare_node(repository_ctx):
yarn_bin_label = ("%s/bin/yarn.js" % yarn_package) if not is_windows else ("%s/yarn.cmd" % yarn_package)
yarn_script = "%s/bin/yarn.js" % yarn_path

# Ensure that the "vendored" binaries are resolved
# Just requesting their path from the repository context is enough to eager-load them
if repository_ctx.attr.vendored_node:
repository_ctx.path(Label(node_bin_label))
if repository_ctx.attr.vendored_yarn:
repository_ctx.path(Label(yarn_bin_label))

entry_ext = ".cmd" if is_windows else ""
node_entry = "bin/node%s" % entry_ext
npm_entry = "bin/npm%s" % entry_ext
Expand Down

0 comments on commit 586b89e

Please sign in to comment.