Skip to content

Commit 5f70331

Browse files
committed
Support the list form of actions.run_shell's "command" argument when wrapping actions in the Xcode toolchain.
PiperOrigin-RevId: 205430358
1 parent 88ac6c3 commit 5f70331

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

swift/internal/xcode_swift_toolchain.bzl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,12 @@ def _run_shell_action(
253253
# Prepend the wrapper executable to the command being executed.
254254
user_command = remaining_args.pop("command", "")
255255
if type(user_command) == type([]):
256-
fail("Toolchain shell actions do not support the deprecated list form of the 'command' " +
257-
"argument.")
258-
259-
command = "{wrapper_path} {user_command}".format(
260-
user_command = user_command,
261-
wrapper_path = wrapper.path,
262-
)
256+
command = [wrapper.path] + user_command
257+
else:
258+
command = "{wrapper_path} {user_command}".format(
259+
user_command = user_command,
260+
wrapper_path = wrapper.path,
261+
)
263262

264263
actions.run_shell(
265264
command = command,

0 commit comments

Comments
 (0)