diff --git a/internal/node/launcher.sh b/internal/node/launcher.sh index 35fc6d04de..191622f83e 100644 --- a/internal/node/launcher.sh +++ b/internal/node/launcher.sh @@ -74,7 +74,12 @@ source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \ # 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 455a864386..42a308e3e3 100644 --- a/internal/node/test/env.spec.js +++ b/internal/node/test/env.spec.js @@ -58,12 +58,6 @@ describe('launcher.sh environment', function() { `${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); });