Skip to content

Commit

Permalink
fix(builtin): generated nodejs repository for windows references non-…
Browse files Browse the repository at this point in the history
…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'
```
  • Loading branch information
devversion authored and gregmagolan committed May 18, 2021
1 parent 5de145e commit c1663c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/node/node_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c1663c5

Please sign in to comment.