Skip to content

Commit

Permalink
Merge pull request #114 from SanjulaGanepola/feature/log-exit-message
Browse files Browse the repository at this point in the history
Log exit code after workflow execution
  • Loading branch information
SanjulaGanepola authored Dec 11, 2024
2 parents 0d833e2 + 0c71e88 commit b4be65b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/act.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,16 +626,13 @@ export class Act {
await this.storageManager.update(StorageKey.WorkspaceHistory, this.historyManager.workspaceHistory);

if (signal === 'SIGINT') {
writeEmitter.fire(`\r\nTask interrupted.\r\n`);
writeEmitter.fire(`\r\n${commandArgs.name} #${count} was interrupted.\r\n`);
closeEmitter.fire(code || 1);
} else {
writeEmitter.fire(`\r\nTask exited with exit code ${code}.\r\n`);
writeEmitter.fire(`\r\n${commandArgs.name} #${count} exited with exit code ${code}.\r\n`);
closeEmitter.fire(code || 0);
}
});
exec.on('close', (code) => {
closeEmitter.fire(code || 0);
});

return {
onDidWrite: writeEmitter.event,
Expand Down

0 comments on commit b4be65b

Please sign in to comment.