diff --git a/Dockerfile b/Dockerfile index 32835463..e31b7310 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN chmod +x /metrics/source/app/action/index.mjs \ && apt-get install -y ruby-full \ && apt-get install -y git g++ cmake pkg-config libicu-dev zlib1g-dev libcurl4-openssl-dev libssl-dev ruby-dev \ && gem install github-linguist \ - && gem install licensed \ + && gem install licensed -v 2.15.2 \ # Install python for node-gyp && apt-get install -y python3 \ # Install node modules diff --git a/source/plugins/licenses/index.mjs b/source/plugins/licenses/index.mjs index d43667ec..0a5fd3da 100644 --- a/source/plugins/licenses/index.mjs +++ b/source/plugins/licenses/index.mjs @@ -56,18 +56,6 @@ export default async function({login, q, imports, data, graphql, queries, accoun //Spawn licensed process console.debug(`metrics/compute/${login}/plugins > licenses > running licensed`) - try { - console.debug(await imports.run("npm list --production --all", {cwd:path})) - } - catch (error) { - console.debug(error) - } - try { - console.debug(await imports.run("npm list", {cwd:path})) - } - catch (error) { - console.debug(error) - } JSON.parse(await imports.run("licensed list --format=json --licenses", {cwd:path})).apps .map(({sources}) => sources?.flatMap(source => source.dependencies?.map(({dependency, license}) => { used[license] = (used[license] ?? 0) + 1