From 31912803caac029302c5db07e22fbb2aacec68cb Mon Sep 17 00:00:00 2001 From: cheister Date: Wed, 17 Feb 2021 13:30:08 -0800 Subject: [PATCH] Only print debug if quiet is false (#2467) --- internal/npm_install/npm_install.bzl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/npm_install/npm_install.bzl b/internal/npm_install/npm_install.bzl index 5964239a18..2f312faae5 100644 --- a/internal/npm_install/npm_install.bzl +++ b/internal/npm_install/npm_install.bzl @@ -333,7 +333,8 @@ cd /D "{root}" && "{npm}" {npm_args} # removeNPMAbsolutePaths is run on node_modules after npm install as the package.json files # generated by npm are non-deterministic. They contain absolute install paths and other private # information fields starting with "_". removeNPMAbsolutePaths removes all fields starting with "_". - print([node, repository_ctx.path(remove_npm_absolute_paths), root + "/node_modules"]) + if not repository_ctx.attr.quiet: + print([node, repository_ctx.path(remove_npm_absolute_paths), root + "/node_modules"]) result = repository_ctx.execute( [node, repository_ctx.path(remove_npm_absolute_paths), root + "/node_modules"], ) @@ -356,9 +357,9 @@ See npm CLI docs https://docs.npmjs.com/cli/install.html for complete list of su "npm_command": attr.string( default = "ci", doc = """The npm command to run, to install dependencies. - + See npm docs - + In particular, for "ci" it says: > If dependencies in the package lock do not match those in package.json, npm ci will exit with an error, instead of updating the package lock. """, @@ -372,7 +373,7 @@ See npm CLI docs https://docs.npmjs.com/cli/install.html for complete list of su doc = """Runs npm install during workspace setup. This rule will set the environment variable `BAZEL_NPM_INSTALL` to '1' (unless it -set to another value in the environment attribute). Scripts may use to this to +set to another value in the environment attribute). Scripts may use to this to check if yarn is being run by the `npm_install` repository rule. @@ -548,7 +549,7 @@ to yarn so that the local cache is contained within the external repository. doc = """Runs yarn install during workspace setup. This rule will set the environment variable `BAZEL_YARN_INSTALL` to '1' (unless it -set to another value in the environment attribute). Scripts may use to this to +set to another value in the environment attribute). Scripts may use to this to check if yarn is being run by the `yarn_install` repository rule.