Skip to content

Commit 94e17bb

Browse files
committed
added exit on build complete
1 parent d8e72e9 commit 94e17bb

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/lib/utils.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -864,20 +864,22 @@ export async function startSSEListener(ctx: Context) {
864864

865865
case 'Dot_buildCompleted':
866866
ctx.log.debug('Build completed');
867-
console.log('Build completed');
868-
currentConnection?.abort();
869-
break;
867+
ctx.log.info(chalk.green.bold('Build completed'));
868+
process.exit(0);
870869
case 'DOTUIError':
871870
if (data.buildId== ctx.build.id) {
872871
errorCount++;
873-
console.error('Error in build:', data.message);
872+
ctx.log.info(chalk.red.bold(`Error in build: ${data.message}`));
873+
}
874+
break;
875+
case 'DOTUIWarning':
876+
if (data.buildId== ctx.build.id) {
877+
ctx.log.info(chalk.yellow.bold(`Warning in build: ${data.message}`));
874878
}
875879
break;
876-
877880
case 'error':
878881
ctx.log.debug('SSE Error occurred:', data);
879-
currentConnection?.abort();
880-
break;
882+
process.exit(0);
881883

882884
}
883885
}

src/tasks/exec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default (ctx: Context): ListrTask<Context, ListrRendererFactory, ListrRen
2020
if(ctx.env.LT_USERNAME&&ctx.env.LT_ACCESS_KEY) {
2121
startSSEListener(ctx);
2222
} else {
23-
console.log('LT_USERNAME and LT_ACCESS_KEY are not set, set them to display render errors');
23+
ctx.log.info('LT_USERNAME and LT_ACCESS_KEY are not set, set them to display render errors');
2424
}
2525
}
2626

0 commit comments

Comments
 (0)