diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteExecutionService.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteExecutionService.java index e00ffb04490ea3..e3ca2be4dd63aa 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/RemoteExecutionService.java +++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteExecutionService.java @@ -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; diff --git a/src/test/shell/bazel/remote/build_without_the_bytes_test.sh b/src/test/shell/bazel/remote/build_without_the_bytes_test.sh index 813c3b1de769b0..b8cb18b9076341 100755 --- a/src/test/shell/bazel/remote/build_without_the_bytes_test.sh +++ b/src/test/shell/bazel/remote/build_without_the_bytes_test.sh @@ -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