File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ build:clippy --output_groups=+clippy_checks
27
27
# https://github.com/bazelbuild/bazel/issues/8195
28
28
build --incompatible_disallow_empty_glob=true
29
29
30
+ # https://github.com/bazelbuild/bazel/issues/12821
31
+ build --nolegacy_external_runfiles
32
+
30
33
###############################################################################
31
34
## Custom user flags
32
35
##
Original file line number Diff line number Diff line change @@ -174,6 +174,11 @@ fn write_test_runner_unix(
174
174
let mut content = vec ! [
175
175
"#!/usr/bin/env bash" . to_owned( ) ,
176
176
"" . to_owned( ) ,
177
+ // TODO: Instead of creating a symlink to mimic the behavior of
178
+ // --legacy_external_runfiles, this rule should be able to correcrtly
179
+ // sanitize the action args to run in a runfiles without this link.
180
+ "if [[ ! -e 'external' ]]; then ln -s ../ external ; fi" . to_owned( ) ,
181
+ "" . to_owned( ) ,
177
182
"exec env - \\ " . to_owned( ) ,
178
183
] ;
179
184
@@ -228,6 +233,12 @@ fn write_test_runner_windows(
228
233
let content = vec ! [
229
234
"@ECHO OFF" . to_owned( ) ,
230
235
"" . to_owned( ) ,
236
+ // TODO: Instead of creating a symlink to mimic the behavior of
237
+ // --legacy_external_runfiles, this rule should be able to correcrtly
238
+ // sanitize the action args to run in a runfiles without this link.
239
+ "powershell.exe -c \" if (!(Test-Path .\\ external)) { New-Item -Path .\\ external -ItemType SymbolicLink -Value ..\\ }\" "
240
+ . to_owned( ) ,
241
+ "" . to_owned( ) ,
231
242
format!( "powershell.exe -c \" {env_str} ; & {argv_str}\" " ) ,
232
243
"" . to_owned( ) ,
233
244
] ;
You can’t perform that action at this time.
0 commit comments