From c1663c5603faed0e0f91990f0e18e4baa081480a Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 13 May 2021 21:57:09 +0200 Subject: [PATCH] fix(builtin): generated nodejs repository for windows references non-existent file The generated NodeJS repository for windows. e.g. `@nodejs_windows_amd64` references a non-existent file that is supposed to be the Yarn script. The `yarn.cmd` file is located under `bin/` in the extracted Yarn archive, and not at the top-level. This currently breaks integration tests in the Angular framework due to the following error when the following target is referenced: `@nodejs//:yarn_bin`. ``` missing input file 'external/nodejs_windows_amd64/bin/yarnpkg/yarn.cmd', owner: '@nodejs_windows_amd64//:bin/yarnpkg/yarn.cmd' ``` --- internal/node/node_repositories.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/node/node_repositories.bzl b/internal/node/node_repositories.bzl index ac3a166806..f0910883c8 100644 --- a/internal/node/node_repositories.bzl +++ b/internal/node/node_repositories.bzl @@ -430,8 +430,8 @@ def _prepare_node(repository_ctx): npx_bin_label = ("%s/lib/node_modules/npm/bin/npx-cli.js" % node_package) if not is_windows else ("%s/npx.cmd" % node_package) # Use the yarn.js script as the bin for oxs & linux so there are no symlink issues with `%s/bin/npm` - yarn_bin = ("%s/bin/yarn.js" % yarn_path) if not is_windows else ("%s/yarn.cmd" % yarn_path) - yarn_bin_label = ("%s/bin/yarn.js" % yarn_package) if not is_windows else ("%s/yarn.cmd" % yarn_package) + yarn_bin = ("%s/bin/yarn.js" % yarn_path) if not is_windows else ("%s/bin/yarn.cmd" % yarn_path) + yarn_bin_label = ("%s/bin/yarn.js" % yarn_package) if not is_windows else ("%s/bin/yarn.cmd" % yarn_package) yarn_script = "%s/bin/yarn.js" % yarn_path # Ensure that the "vendored" binaries are resolved