Skip to content

Commit 9d8f546

Browse files
authored
fix: Handle canonical repo name for cquery (#224)
1 parent 79f4073 commit 9d8f546

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cli/src/main/kotlin/com/bazel_diff/bazel/BazelQueryService.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,12 @@ class BazelQueryService(
103103
return ""
104104
if "IncompatiblePlatformProvider" not in providers(target):
105105
label = str(target.label)
106+
# normalize label to be consistent with content inside proto
106107
if label.startswith("@//"):
107-
# normalize label to be consistent with content inside proto
108108
return label[1:]
109-
else:
110-
return label
109+
if label.startswith("@@//"):
110+
return label[2:]
111+
return label
111112
return ""
112113
""".trimIndent())
113114
add(cqueryOutputFile.toString())

0 commit comments

Comments
 (0)