Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(builtin): resolve vendored node/yarn from external repo #2614

Merged
merged 1 commit into from
Apr 19, 2021
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
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