Merge pull request #225 from crazy-max/fix-bake-error
Some checks failed
publish / publish (push) Has been cancelled
Some checks failed
publish / publish (push) Has been cancelled
bake: correctly match error when parsing definition
This commit is contained in:
@@ -77,7 +77,7 @@ export class Bake {
|
|||||||
silent: true
|
silent: true
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
throw new Error(res.stderr);
|
throw new Error(`cannot parse bake definitions: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
|
||||||
}
|
}
|
||||||
return <BakeDefinition>JSON.parse(res.stdout.trim());
|
return <BakeDefinition>JSON.parse(res.stdout.trim());
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user