Skip to content

Commit

Permalink
fix: fix for #1307
Browse files Browse the repository at this point in the history
This fixes a new issue introduced with Bazel 1.0.0 where Bazel adds a `{workspace}/.runfile` to the runfiles MANIFEST and this messes with the node_loader resolve logic on Windows.
  • Loading branch information
gregmagolan committed Oct 28, 2019
1 parent 99f16b0 commit 7163571
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/node/node_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ function loadRunfilesManifest(manifestPath) {
// We don't need to try determining the local workspace path for the current runfile
// mapping in case we already determined the local workspace path, the current
// runfile refers to a different workspace, or the current runfile resolves to a file
// in the bazel-out directory (bin/genfiles directory).
if (localWorkspacePath || !runfilesPath.startsWith(USER_WORKSPACE_NAME) ||
// in the bazel-out directory (bin/genfiles directory). Also exclude the case of no
// realpath which fixes https://github.com/bazelbuild/rules_nodejs/issues/1307.
if (localWorkspacePath || !runfilesPath.startsWith(USER_WORKSPACE_NAME) || !realPath ||
realPath.startsWith(outputBase)) {
continue;
}
Expand Down

0 comments on commit 7163571

Please sign in to comment.