Skip to content

Commit

Permalink
Push _check_min_bazel_version to after inputs marked
Browse files Browse the repository at this point in the history
  • Loading branch information
Silic0nS0ldier committed Nov 15, 2023
1 parent 3bdb09a commit 70132f0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/npm_install/npm_install.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,6 @@ def _check_min_bazel_version(rule, repository_ctx):
def _npm_install_impl(repository_ctx):
"""Core implementation of npm_install."""

_check_min_bazel_version("npm_install", repository_ctx)

# Mark inputs as dependencies with repository_ctx.path to reduce repo fetch restart costs
repository_ctx.path(repository_ctx.attr.package_json)
repository_ctx.path(repository_ctx.attr.yarn_lock)
Expand All @@ -570,6 +568,7 @@ def _npm_install_impl(repository_ctx):
repository_ctx.path(Label("//internal/npm_install:pre_process_package_json.js"))
repository_ctx.path(Label("//internal/npm_install:index.js"))

_check_min_bazel_version("npm_install", repository_ctx)
is_windows_host = is_windows_os(repository_ctx)

# Set the base command (install or ci)
Expand Down Expand Up @@ -703,8 +702,6 @@ check if yarn is being run by the `npm_install` repository rule.""",
def _yarn_install_impl(repository_ctx):
"""Core implementation of yarn_install."""

_check_min_bazel_version("yarn_install", repository_ctx)

# Mark inputs as dependencies with repository_ctx.path to reduce repo fetch restart costs
repository_ctx.path(repository_ctx.attr.package_json)
repository_ctx.path(repository_ctx.attr.yarn_lock)
Expand All @@ -715,6 +712,7 @@ def _yarn_install_impl(repository_ctx):
repository_ctx.path(Label("//internal/npm_install:pre_process_package_json.js"))
repository_ctx.path(Label("//internal/npm_install:index.js"))

_check_min_bazel_version("yarn_install", repository_ctx)
is_windows_host = is_windows_os(repository_ctx)

yarn_args = []
Expand Down

0 comments on commit 70132f0

Please sign in to comment.