Open phst opened 2 years ago
Clearly this is a bug: ctx.expand_location
returns a string containing a list of shell-quoted paths joined with spaces, but skylib assumes that shell tokenization is not needed (see comment in _impl in rules/run_binary.bzl).
The question is how best to fix it.
Example:
WORKSPACE:
BUILD:
cat.sh:
a.txt and b.txt are arbitrary source files.
Running
bazel build //:cat.out
will then result in an error message:This is because
$(locations …)
expands to a single string.Not sure whether this can be fixed in Skylib alone – probably needs a Bazel/Starlark change for a variant of
ctx.expand_location
that works on anArgs
object.