diff --git a/src/main/java/com/google/devtools/build/lib/cmdline/Label.java b/src/main/java/com/google/devtools/build/lib/cmdline/Label.java index 4190b53410a46c..e794e74099a2d5 100644 --- a/src/main/java/com/google/devtools/build/lib/cmdline/Label.java +++ b/src/main/java/com/google/devtools/build/lib/cmdline/Label.java @@ -689,7 +689,7 @@ public void debugPrint(Printer printer, StarlarkThread thread) { // ignore } } - printer.append(getDisplayForm(mainRepoMapping)); + printer.append(getShorthandDisplayForm(mainRepoMapping)); } @Override diff --git a/src/test/shell/bazel/workspace_test.sh b/src/test/shell/bazel/workspace_test.sh index 8d27e8847831d5..1a18375d94b454 100755 --- a/src/test/shell/bazel/workspace_test.sh +++ b/src/test/shell/bazel/workspace_test.sh @@ -723,8 +723,8 @@ EOF cd main bazel build @foo//:bar \ >& "$TEST_log" || fail "Expected build to succeed" - expect_log "@b//blah:blah" - expect_not_log "@a//blah:blah" + expect_log "@b//blah" + expect_not_log "@a//blah" } function test_workspace_addition_change_aspect() {