Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions skylib/path.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ def strip_prefix(path, prefix):

def runfile(ctx, f):
"""Return the runfiles relative path of f."""
if f.short_path[:3] == "../":
return f.short_path[3:]
if f.owner and f.owner.workspace_root:
return f.owner.workspace_root + "/" + f.short_path
if ctx.workspace_name:
return ctx.workspace_name + "/" + f.short_path
else:
Expand Down