Skip to content

Commit 04e5f1d

Browse files
committed
fix: support running with --enable_runfiles on Windows
I was finding the run and test commands on a nodejs binary on Windows gave an error message similar to the one mentioned in the following post when --enable_runfiles is passed in on the command line: #2178 (comment) Running with --noenable_runfiles, the tests worked correctly, but other packages in my repo require runfiles. This patch changes the resolution to use the MANIFEST file inside the runfiles folder when runfiles are enabled, which seems to fix the issue.
1 parent 7532f9e commit 04e5f1d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/common/windows_utils.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ if "%RUNFILES_MANIFEST_ONLY%" neq "1" (
3535
set %~2=%~1
3636
exit /b 0
3737
)
38+
if "%RUN_UNDER_RUNFILES%" equ "1" (
39+
set RUNFILES_MANIFEST_FILE=%RUNFILES_DIR%\MANIFEST
40+
)
3841
if "%RUNFILES_MANIFEST_FILE%" equ "" (
3942
set RUNFILES_MANIFEST_FILE=%~f0.runfiles\MANIFEST
4043
)

0 commit comments

Comments
 (0)