fix(builtin): fix a bug where the launcher produces incorrect runfiles path on windows
diff --git a/internal/node/launcher.sh b/internal/node/launcher.sh index 35fc6d0..191622f 100644 --- a/internal/node/launcher.sh +++ b/internal/node/launcher.sh
@@ -74,7 +74,12 @@ # Case 6a is handled like case 3. if [ "${TEST_SRCDIR:-}" ]; then # Case 4, bazel has identified runfiles for us. - RUNFILES="$TEST_SRCDIR" + if [ "$(is_windows)" -eq "1" ]; then + # If Windows, normalize the path + RUNFILES=$(normalize_windows_path "$TEST_SRCDIR") + else + RUNFILES="$TEST_SRCDIR" + fi elif [ "${RUNFILES_MANIFEST_FILE:-}" ]; then if [ "$(is_windows)" -eq "1" ]; then # If Windows, normalize the path
diff --git a/internal/node/test/env.spec.js b/internal/node/test/env.spec.js index 455a864..42a308e 100644 --- a/internal/node/test/env.spec.js +++ b/internal/node/test/env.spec.js
@@ -58,12 +58,6 @@ `${runfilesRoot}`, `${runfilesRoot}/build_bazel_rules_nodejs/node_modules`, ]; - if (isWindows) { - expectedRoots.push( - process.env['RUNFILES'], - `${process.env['RUNFILES']}/build_bazel_rules_nodejs/node_modules` - ); - } expectPathsToMatch(process.env['BAZEL_PATCH_ROOTS'].split(','), expectedRoots); });