Skip to content

Commit 47b78d3

Browse files
committed
Add use_default_shell_env to run / run_shell
This fixes bazelbuild/bazel#12049 and apparently is the recommendation wherever possible.
1 parent b7a2693 commit 47b78d3

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

swift/internal/actions.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ def run_toolchain_action(
240240
actions.run(
241241
arguments = [tool_executable_args, args],
242242
env = tool_config.env,
243+
use_default_shell_env = True,
243244
executable = executable,
244245
execution_requirements = execution_requirements,
245246
inputs = depset(

swift/internal/linking.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def _register_static_library_link_action(
8383
actions.run(
8484
arguments = [args, filelist_args],
8585
env = env,
86+
use_default_shell_env = True,
8687
executable = archiver_path,
8788
execution_requirements = execution_requirements,
8889
inputs = depset(

swift/internal/swift_binary_test.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ def _create_xctest_bundle(name, actions, binary):
278278

279279
actions.run_shell(
280280
arguments = [args],
281+
use_default_shell_env = True,
281282
command = (
282283
'mkdir -p "$1/Contents/MacOS" && ' +
283284
'cp "$2" "$1/Contents/MacOS"'

swift/internal/swift_grpc_library.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ def _register_grpcswift_generate_action(
187187
protoc_executable,
188188
protoc_plugin_executable,
189189
],
190+
use_default_shell_env = True,
190191
mnemonic = "ProtocGenSwiftGRPC",
191192
outputs = generated_files,
192193
progress_message = "Generating Swift sources for {}".format(label),

swift/internal/swift_protoc_gen_aspect.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ def _register_pbswift_generate_action(
227227
protoc_executable,
228228
protoc_plugin_executable,
229229
],
230+
use_default_shell_env = True,
230231
)
231232

232233
return generated_files

0 commit comments

Comments
 (0)