diff --git a/lib/apple_support.bzl b/lib/apple_support.bzl index 22c88b8..f6ad2d9 100644 --- a/lib/apple_support.bzl +++ b/lib/apple_support.bzl @@ -446,16 +446,6 @@ def _run_shell( actions = actions, ) - # TODO(b/77637734) remove "workaround" once the bazel issue is resolved. - # Bazel doesn't always get the shell right for a single string `commands`; - # so work around that case by faking it as a list of strings that forces - # the shell correctly. - command = kwargs.get("command") - if command and types.is_string(command): - processed_args = dict(kwargs) - processed_args["command"] = ["/bin/sh", "-c", command] - kwargs = processed_args - if not actions: actions = ctx.actions diff --git a/rules/apple_genrule.bzl b/rules/apple_genrule.bzl index fbfeb74..410d284 100644 --- a/rules/apple_genrule.bzl +++ b/rules/apple_genrule.bzl @@ -80,7 +80,7 @@ def _apple_genrule_impl(ctx): inputs = resolved_srcs.to_list() + resolved_inputs, outputs = files_to_build.to_list(), env = ctx.configuration.default_shell_env, - command = argv, + command = " ".join(argv), progress_message = "%s %s" % (message, ctx.label), mnemonic = "Genrule", input_manifests = runfiles_manifests, diff --git a/test/apple_support_test.bzl b/test/apple_support_test.bzl index 4816af0..8adae7d 100644 --- a/test/apple_support_test.bzl +++ b/test/apple_support_test.bzl @@ -172,10 +172,10 @@ def _apple_support_test_impl(ctx): ctx, outputs = [run_shell_output], tools = [test_tool], - command = ["/bin/bash", "-c", "{tool} {output}".format( + command = "{tool} {output}".format( output = run_shell_output.path, tool = test_tool.path, - )], + ), ) test_files = [