Unverified Commit 6187b023 authored by ThomVui's avatar ThomVui Committed by GitHub

Fix elif branch to actually show compiler errors (#65)

parent 769e5ab0
...@@ -141,11 +141,10 @@ export default class Deploy extends Command { ...@@ -141,11 +141,10 @@ export default class Deploy extends Command {
if (deployResult.status === 'error') { if (deployResult.status === 'error') {
throw new Error(`Unknown error occurred while deploying ${JSON.stringify(deployResult)}`); throw new Error(`Unknown error occurred while deploying ${JSON.stringify(deployResult)}`);
} else if (!deployResult.success) { } else if (!deployResult.success) {
throw new Error(`Deployment error: ${ deployResult.error }`); if (deployResult.status === 'compiler_error') {
} throw new Error(`Deployment compiler errors: \n${ JSON.stringify(deployResult.messages, null, 2) }`);
}
if (deployResult.compilerErrors && deployResult.compilerErrors.length > 0) { throw new Error(`Deployment error: ${ deployResult }`);
throw new Error(`Deployment compiler errors: \n${ JSON.stringify(deployResult.compilerErrors, null, 2) }`);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment