diff --git a/WORKSPACE b/WORKSPACE index eadb6ff1fa22..7d965db6db45 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -794,13 +794,25 @@ dev_env_tool( "share", ], nix_label = "@node_nix", - nix_paths = [], + nix_paths = [ + "bin/node", + "bin/npm", + "bin/npx", + ], prefix = "nodejs_dev_env", - tools = [], + tools = [ + "node", + "npm", + "npx", + ], win_include = [ ".", ], - win_paths = [], + win_paths = [ + "node.exe", + "npm.cmd", + "npx.cmd", + ], win_tool = "nodejs-10.12.0", ) diff --git a/bazel_tools/dev_env_tool/dev_env_tool.bzl b/bazel_tools/dev_env_tool/dev_env_tool.bzl index dd1a1fe76e64..3fe5e8e5edfa 100644 --- a/bazel_tools/dev_env_tool/dev_env_tool.bzl +++ b/bazel_tools/dev_env_tool/dev_env_tool.bzl @@ -76,6 +76,11 @@ def _dev_env_tool_impl(ctx): dadew = _dadew_where(ctx, ps) find = _dadew_tool_home(dadew, "msys2") + "\\usr\\bin\\find.exe" tool_home = _dadew_tool_home(dadew, ctx.attr.win_tool) + + # Copy the manifest to ensure that updates are noticed. + ctx.template("bazel-support\\manifest.json", "%s\\manifest.json" % tool_home, executable = False) + + # Link the requested files. for i in ctx.attr.win_include: src = "%s\%s" % (tool_home, i) dst = ctx.attr.win_include_as.get(i, i) @@ -137,4 +142,5 @@ dev_env_tool = repository_rule( ), "prefix": attr.string(), }, + local = True, ) diff --git a/build.ps1 b/build.ps1 index 2c6536319f34..a551439f76c0 100644 --- a/build.ps1 +++ b/build.ps1 @@ -30,6 +30,10 @@ function bazel() { # which is a workaround for this problem. bazel shutdown +# Manually fetch a Windows dev-env tool to avoid the following error: +# ERROR loading ~/.scoop: The process cannot access the file 'C:\Users\VssAdministrator\.scoop' because it is being used by another process. +bazel fetch @makensis_dev_env//... + bazel build `-`-experimental_execution_log_file ${ARTIFACT_DIRS}/build_execution_windows.log //... bazel shutdown