Skip to content

Commit f73eaad

Browse files
committed
Fix aspect_bazel_lib write_source_file on Windows
1 parent c608f20 commit f73eaad

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

MODULE.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ module(
66

77
bazel_dep(name = "abseil-cpp", version = "20250512.1")
88
bazel_dep(name = "aspect_bazel_lib", version = "2.19.4")
9+
single_version_override(
10+
module_name = "aspect_bazel_lib",
11+
patch_strip = 1,
12+
patches = [
13+
"bazel/aspect_bazel_lib.patch",
14+
],
15+
)
916
bazel_dep(name = "bazel_skylib", version = "1.8.0")
1017
bazel_dep(name = "boringssl", version = "0.20250701.0")
1118
single_version_override(

bazel/aspect_bazel_lib.patch

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--- a/lib/private/write_source_file.bzl
2+
+++ b/lib/private/write_source_file.bzl
3+
@@ -323,7 +323,7 @@ def _write_source_file_bat(ctx, paths):
4+
@echo off
5+
set runfiles_dir=%cd%
6+
if defined BUILD_WORKSPACE_DIRECTORY (
7+
- cd %BUILD_WORKSPACE_DIRECTORY%
8+
+ cd /d %BUILD_WORKSPACE_DIRECTORY%
9+
)"""]
10+
11+
progress_message = ""
12+
@@ -360,7 +360,7 @@ if exist "%in%\\*" (
13+
))
14+
15+
contents.extend([
16+
- "cd %runfiles_dir%",
17+
+ "cd /d %runfiles_dir%",
18+
"@rem Run the update scripts for all write_source_file deps",
19+
])
20+
for update_script in additional_update_scripts:

0 commit comments

Comments
 (0)