diff options
author | 2016-05-10 22:20:12 +0000 | |
---|---|---|
committer | 2016-05-11 10:23:49 +0000 | |
commit | d15c5be755b86017a19864a230e613c166d63737 (patch) | |
tree | 16e7ac4f574db15bb30aeb3e70533e0e77b58b4f /src/main/java/com/google/devtools/build/lib/actions | |
parent | 0a447860fa68bdfefe6d5cd506f0de0562f18955 (diff) |
Use runfiles path, not execroot path, for Skylark's short_path
Will help with fixing #1233.
--
MOS_MIGRATED_REVID=121993946
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/Artifact.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java index 3c71f88baf..e801a7e0a0 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java +++ b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java @@ -512,6 +512,18 @@ public class Artifact return relativePath; } + @SkylarkCallable( + name = "short_path", + structField = true, + doc = + "The path of this file relative to its root. This excludes the aforementioned " + + "<i>root</i>, i.e. configuration-specific fragments of the path. This is also the " + + "path under which the file is mapped if it's in the runfiles of a binary." + ) + public final String getRunfilesPathString() { + return getRunfilesPath().getPathString(); + } + /** * Returns this.getExecPath().getPathString(). */ @@ -541,14 +553,6 @@ public class Artifact return ShellUtils.shellEscape(getExecPathString()); } - @SkylarkCallable( - name = "short_path", - structField = true, - doc = - "The path of this file relative to its root. This excludes the aforementioned " - + "<i>root</i>, i.e. configuration-specific fragments of the path. This is also the " - + "path under which the file is mapped if it's in the runfiles of a binary." - ) public final String getRootRelativePathString() { return getRootRelativePath().getPathString(); } |