File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ def _download_node(repository_ctx):
119119 sha256 = sha256 ,
120120 ))
121121
122+ # Return whether the download was reproducible
123+ return sha256 != None
124+
122125def _prepare_node (repository_ctx ):
123126 """Sets up BUILD files and shell wrappers for the versions of Node.js, npm just set up.
124127
@@ -309,9 +312,15 @@ def _verify_version_is_valid(version):
309312 fail ("Invalid node version: %s" % version )
310313
311314def _nodejs_repositories_impl (repository_ctx ):
312- _download_node (repository_ctx )
315+ reproducible = _download_node (repository_ctx )
313316 _prepare_node (repository_ctx )
314317
318+ # Bazel <8.3.0 lacks repository_ctx.repo_metadata
319+ if not hasattr (repository_ctx , "repo_metadata" ):
320+ return None
321+
322+ return repository_ctx .repo_metadata (reproducible = reproducible )
323+
315324_nodejs_repositories = repository_rule (
316325 _nodejs_repositories_impl ,
317326 attrs = _ATTRS ,
You can’t perform that action at this time.
0 commit comments