diff --git a/lib/integration/AdaptFramework/build.js b/lib/integration/AdaptFramework/build.js index cff4d5f..baeda09 100644 --- a/lib/integration/AdaptFramework/build.js +++ b/lib/integration/AdaptFramework/build.js @@ -29,8 +29,9 @@ export default async function adaptBuild ({ exec(cmd, { cwd }, (error, stdout, stderr) => { if(error || stderr) { const e = new Error('grunt tasks failed') - e.cmd = cmd; - e.raw = stdout.match(/>> Error:\s(.+)\s/)[1] + e.cmd = cmd + const match = stdout.match(/>> Error:\s(.+)\s/) + e.raw = match ? match[1][0] : stderr return reject(e) } resolve()