aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/packages/SubincludePreprocessorTest.java
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2016-10-14 13:37:46 +0000
committerGravatar Yun Peng <pcloudy@google.com>2016-10-14 20:24:23 +0000
commitf50e6691da8aa685f31165c66a245b85f68abf06 (patch)
tree2aa5b7835d0ab63e9381b400c77d110f5d9b527d /src/test/java/com/google/devtools/build/lib/packages/SubincludePreprocessorTest.java
parentfa4f24abf21923bb361ea6b01953cf91173ca7ca (diff)
Expand $(location :label) to string unambiguously a path
In genrules, cmd strings of the form "$(location :label) ..." are used with the assumption that the executable named by the label will be called. This holds true as long as $(location :label) expands to a string that is recognizable as a path, i.e., as long as :label does not refer to a file in the top-level directory. In the latter case, however, that string will be the plain file name and the shell will search for that name in the search path. This will fail, if '.' is not in the search path; even worse, if a file with that name is in the search path before '.', then that one will be called which is not what the user intended to do. Fix this unintended behavior by expanding $(location :label) to a string that unambiguously is a path. -- Change-Id: If8681039a8befae6234fbe0cbe3a0f75eedba7aa Reviewed-on: https://bazel-review.googlesource.com/#/c/6691 MOS_MIGRATED_REVID=136151500
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/packages/SubincludePreprocessorTest.java')
0 files changed, 0 insertions, 0 deletions