Commit 059504b0 authored by rockyl's avatar rockyl

exit code

parent 1970f918
......@@ -6,6 +6,10 @@ const {execute: executeDeclareGenerator} = require('scilla-declare-generator/bin
const {execute: executeTsCompiler} = require('scilla-ts-compiler/bin/cli-wrapper');
exports.execute = async function (program) {
await executeDeclareGenerator(program);
await executeTsCompiler(program);
let code;
code = await executeDeclareGenerator(program);
if(code > 0){
return code;
}
return await executeTsCompiler(program);
};
......@@ -15,7 +15,13 @@ program
.option('-p, --projectPath [string]', 'path of project')
.parse(process.argv);
execute(program).catch(e=>{
execute(program).then(
code=>{
if(code > 0){
process.exit(code)
}
}
).catch(e=>{
console.error(e);
process.exit(2);
process.exit(99);
});
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