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
|
||||
}).then(res => {
|
||||
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());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user