Skip to content

Commit

Permalink
Fix crash on multiple output symlinks with BwoB
Browse files Browse the repository at this point in the history
Fixes an issue introduced by ca30372.

Fixes bazelbuild/rules_go#3545

Closes bazelbuild#18207.

PiperOrigin-RevId: 527160752
Change-Id: I8baa3b8f855e22226ba83155e56fd9889a1f2051
  • Loading branch information
fmeum authored and Copybara-Service committed Apr 26, 2023
1 parent a92ce14 commit 519eef4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -1308,7 +1308,7 @@ private boolean shouldDownloadOutputsFor(
String.format(
"Symlinks in action outputs are not yet supported by --remote_download_minimal,"
+ " falling back to downloading all action outputs due to output symlink %s",
Iterables.getOnlyElement(metadata.symlinks()).path())));
Iterables.get(metadata.symlinks(), 0).path())));
return true;
}
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/test/shell/bazel/remote/build_without_the_bytes_test.sh
Expand Up @@ -418,8 +418,8 @@ EOF
genrule(
name = "foo",
srcs = ["input.txt"],
outs = ["output.txt", "output_symlink"],
cmd = "cp $< $(location :output.txt) && ln -s output.txt $(location output_symlink)",
outs = ["output.txt", "output_symlink", "output_symlink_2"],
cmd = "cp $< $(location :output.txt) && ln -s output.txt $(location output_symlink) && ln -s output.txt $(location output_symlink_2)",
)
EOF

Expand Down

0 comments on commit 519eef4

Please sign in to comment.