summaryrefslogtreecommitdiff
path: root/lib/license/finder/ext/npm.rb
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-11-10 18:43:31 +0000
committermo khan <mo.khan@gmail.com>2020-11-10 18:43:31 +0000
commit191185c4303768c6d9a1431c35143501c06ee4d7 (patch)
tree97e7ac6fffec356e57b0c52e10eacd716281830e /lib/license/finder/ext/npm.rb
parent1bc270fea3b352b44dfcef3fe16e97a2bbd4d7a5 (diff)
parent91f1671c67de9c51407f8527d8fc6197463151d2 (diff)
Merge branch '273255-streaming' into 'main'HEADv3.28.3main
Stream `npm ci` output to log See merge request gitlab-org/security-products/analyzers/license-finder!16
Diffstat (limited to 'lib/license/finder/ext/npm.rb')
-rw-r--r--lib/license/finder/ext/npm.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/license/finder/ext/npm.rb b/lib/license/finder/ext/npm.rb
index 18af4a7..59244c9 100644
--- a/lib/license/finder/ext/npm.rb
+++ b/lib/license/finder/ext/npm.rb
@@ -13,7 +13,7 @@ module LicenseFinder
if lockfile?
shell.execute([:npm, :ci, "--production"], env: default_env, capture: false)
else
- shell.execute([:npm, :install, '--no-save', "--production"], env: default_env)
+ shell.execute([:npm, :install, '--no-save', "--production"], env: default_env, capture: false)
end
end
end
@@ -32,7 +32,7 @@ module LicenseFinder
def npm_json
stdout, _stderr, status = within_project_path do
- shell.execute("npm list --json --long --production")
+ shell.execute([:npm, "list", "--json", "--long", "--production"])
end
status.success? ? JSON.parse(stdout) : {}
end