diff --git a/lib/index.ts b/lib/index.ts index cb5addb..969c3a4 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -520,7 +520,6 @@ async function getAllDeps( if (gradleVersion.match(/Gradle 1/)) { throw new Error('Gradle 1.x is not supported'); } - try { const extractedJSON = await getAllDepsWithPlugin( root, diff --git a/lib/sub-process.ts b/lib/sub-process.ts index fcd9f42..0bea1f6 100644 --- a/lib/sub-process.ts +++ b/lib/sub-process.ts @@ -52,6 +52,10 @@ export function execute( stderr = stderr + data; }); + proc.on('error', (error) => { + stderr = stderr + error; + }); + proc.on('close', (code: number) => { if (code !== 0) { const fullCommand = command + ' ' + args.join(' '); diff --git a/test/system/failure-states.test.ts b/test/system/failure-states.test.ts index 4c13f42..5e6e30f 100644 --- a/test/system/failure-states.test.ts +++ b/test/system/failure-states.test.ts @@ -1,7 +1,7 @@ import * as path from 'path'; +import * as gradle from '../../lib'; import { fixtureDir } from '../common'; import { inspect } from '../../lib'; - const rootNoWrapper = fixtureDir('no wrapper'); test('malformed build.gradle', async () => {