Skip to content

Commit

Permalink
Remove redundant check from ctx.actions.symlink.
Browse files Browse the repository at this point in the history
If ctx.actions.symlink is called with a target_path argument, the output must be an unresolved symlink created by declare_symlink, which already requires --experimental_allow_unresolved_symlinks to be enabled.

PiperOrigin-RevId: 485903233
Change-Id: I2e874bc88fdadc2b41964d5f84f38f85e317829a
  • Loading branch information
tjgq authored and copybara-github committed Nov 3, 2022
1 parent 7dcf0c3 commit c20b1d6
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,6 @@ public void symlink(
ruleContext.getActionOwner(), inputArtifact, outputArtifact, progressMessage);
}
} else {
if (!ruleContext.getConfiguration().allowUnresolvedSymlinks()) {
throw Starlark.errorf(
"actions.symlink() to unresolved symlink is not allowed; "
+ "use the --experimental_allow_unresolved_symlinks command line option");
}

if (!outputArtifact.isSymlink()) {
throw Starlark.errorf(
"symlink() with \"target_path\" param requires that \"output\" be declared as a "
Expand Down

0 comments on commit c20b1d6

Please sign in to comment.