Skip to content

Commit

Permalink
Don't eval tools for truth, just fail if it wasn't the right type.
Browse files Browse the repository at this point in the history
Newer buildifiers were still flagging tools as not always being set,
but the real issue was if the value in the args was say an empty
string, then that last if would have still failed because an empty
string is False. Instead fail if someone passes anything that isn't
a list or depset no mater what the value is.

RELNOTES: None.
PiperOrigin-RevId: 241521323
  • Loading branch information
thomasvl authored and allevato committed Apr 4, 2019
1 parent 9421a06 commit e9130ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion swift/internal/xcode_swift_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def _run_shell_action(
tools = [bazel_xcode_wrapper] + user_tools
elif type(user_tools) == type(depset()):
tools = depset(direct = [bazel_xcode_wrapper], transitive = [user_tools])
elif user_tools:
else:
fail("'tools' argument must be a sequence or depset.")

# Prepend the wrapper executable to the command being executed.
Expand Down

0 comments on commit e9130ae

Please sign in to comment.