From e240b7417c465ab7ea6544ef35ad70cb4d75cdfb Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Thu, 18 Jan 2024 12:13:41 -0800 Subject: [PATCH] No public description PiperOrigin-RevId: 599585682 --- lib/apple_support.bzl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/apple_support.bzl b/lib/apple_support.bzl index ee211c6..917ce8a 100644 --- a/lib/apple_support.bzl +++ b/lib/apple_support.bzl @@ -492,9 +492,10 @@ def _run_shell( # 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. + # the shell correctly. Skip all this if there are arguments as hopefully + # that will work, if it doesn't see the mentioned bug. command = kwargs.get("command") - if command and types.is_string(command): + if command and types.is_string(command) and not kwargs.get("arguments", []): processed_args = dict(kwargs) processed_args["command"] = ["/bin/sh", "-c", command] kwargs = processed_args