With "--enable_runfiles" on windows, the explicit setting of "runfiles_dir" will lead to errors in sub-targets of write_source_files.
Reproduce:
- bazel clean
- bazel run //lib/tests/write_source_files:macro_smoke_test --enable_runfiles
Error:
ERROR: Manifest file C:\Users\xxx\_bazel_XXX\ne3nnzly\execroot\_main\bazel-out\x64_windows-fastbuild\bin\lib\tests\write_source_files\macro_smoke_test_0_update.bat.runfiles_manifest does not exist.
Suggested fix:
- rename "runfiles_dir" -> "current_working_dir" in lib/private/write_source_file.bzl