Skip to content

Commit b02128b

Browse files
authored
fix(builtin): fix a bug where the launcher produces incorrect runfiles path on windows (#3562)
1 parent c725169 commit b02128b

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

internal/node/launcher.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \
7474
# Case 6a is handled like case 3.
7575
if [ "${TEST_SRCDIR:-}" ]; then
7676
# Case 4, bazel has identified runfiles for us.
77-
RUNFILES="$TEST_SRCDIR"
77+
if [ "$(is_windows)" -eq "1" ]; then
78+
# If Windows, normalize the path
79+
RUNFILES=$(normalize_windows_path "$TEST_SRCDIR")
80+
else
81+
RUNFILES="$TEST_SRCDIR"
82+
fi
7883
elif [ "${RUNFILES_MANIFEST_FILE:-}" ]; then
7984
if [ "$(is_windows)" -eq "1" ]; then
8085
# If Windows, normalize the path

internal/node/test/env.spec.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ describe('launcher.sh environment', function() {
5858
`${runfilesRoot}`,
5959
`${runfilesRoot}/build_bazel_rules_nodejs/node_modules`,
6060
];
61-
if (isWindows) {
62-
expectedRoots.push(
63-
process.env['RUNFILES'],
64-
`${process.env['RUNFILES']}/build_bazel_rules_nodejs/node_modules`
65-
);
66-
}
6761
expectPathsToMatch(process.env['BAZEL_PATCH_ROOTS'].split(','), expectedRoots);
6862
});
6963

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy