Skip to content

Commit

Permalink
Only print debug if quiet is false (#2467)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheister authored Feb 17, 2021
1 parent db98319 commit 3191280
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/npm_install/npm_install.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)
Expand All @@ -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 <https://docs.npmjs.com/cli/v6/commands>
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.
""",
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 3191280

Please sign in to comment.