Skip to content

Commit

Permalink
fix(builtin): prevent usage with InputArtifact directories
Browse files Browse the repository at this point in the history
These don't work with RBE, and only work accidentally with actions.
  • Loading branch information
alexeagle authored and gregmagolan committed Jan 24, 2022
1 parent a6281f7 commit 553ef27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nodejs/directory_file_path.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ These are also called output directories, created by `ctx.actions.declare_direct
load("//nodejs/private/providers:directory_file_path_info.bzl", "DirectoryFilePathInfo")

def _directory_file_path(ctx):
if not ctx.file.directory.is_source and not ctx.file.directory.is_directory:
fail("directory attribute must be a source directory or created with Bazel declare_directory (TreeArtifact)")
if not ctx.file.directory.is_directory:
fail("directory attribute must be created with ctx.declare_directory (TreeArtifact)")
return [DirectoryFilePathInfo(path = ctx.attr.path, directory = ctx.file.directory)]

directory_file_path = rule(
Expand Down

0 comments on commit 553ef27

Please sign in to comment.