Skip to content

Commit

Permalink
fix: Handle canonical repo name for cquery (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
honnix authored Sep 20, 2024
1 parent 79f4073 commit 9d8f546
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cli/src/main/kotlin/com/bazel_diff/bazel/BazelQueryService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,12 @@ class BazelQueryService(
return ""
if "IncompatiblePlatformProvider" not in providers(target):
label = str(target.label)
# normalize label to be consistent with content inside proto
if label.startswith("@//"):
# normalize label to be consistent with content inside proto
return label[1:]
else:
return label
if label.startswith("@@//"):
return label[2:]
return label
return ""
""".trimIndent())
add(cqueryOutputFile.toString())
Expand Down

0 comments on commit 9d8f546

Please sign in to comment.