Skip to content

Commit 553ef27

Browse files
alexeaglegregmagolan
authored andcommitted
fix(builtin): prevent usage with InputArtifact directories
These don't work with RBE, and only work accidentally with actions.
1 parent a6281f7 commit 553ef27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nodejs/directory_file_path.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ These are also called output directories, created by `ctx.actions.declare_direct
99
load("//nodejs/private/providers:directory_file_path_info.bzl", "DirectoryFilePathInfo")
1010

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

1616
directory_file_path = rule(

0 commit comments

Comments
 (0)