diff --git a/lib/oto/application.dart b/lib/oto/application.dart index ad9afa4..22d00c3 100644 --- a/lib/oto/application.dart +++ b/lib/oto/application.dart @@ -58,7 +58,7 @@ class Application { await CLI.printString(e.toString(), color: Color.redStrong); await CLI.printString(stacktace.toString(), color: Color.yellowStrong); await printBuildStep('Build Failed', Color.redStrong); - return; + exit(10); } await printBuildStep('Build Successfully Complete', Color.cyan); diff --git a/lib/oto/build/build_dart.dart b/lib/oto/build/build_dart.dart index 28984fa..2bb9de4 100644 --- a/lib/oto/build/build_dart.dart +++ b/lib/oto/build/build_dart.dart @@ -38,6 +38,6 @@ class BuildDart extends Command { workspace: workspace, enableStderr: false); return await complete(await process.process.exitCode, command, - errorMessage: process.stderr.toString(), passCode: [0, 64]); + errorMessage: process.stderr.toString()); } } diff --git a/lib/oto/command.dart b/lib/oto/command.dart index 2fb5961..52ce997 100644 --- a/lib/oto/command.dart +++ b/lib/oto/command.dart @@ -129,7 +129,8 @@ abstract class Command { if (passCode.contains(exitCode)) { return simpleFuture; } else { - var data = ExcpetionData(); + print('Exit Code: $exitCode'); + var data = ExceptionData(); data.phase = command.name; data.message = errorMessage; throw Exception(data); @@ -148,7 +149,14 @@ class SimpleCommand extends Command { } } -class ExcpetionData { +class ExceptionData { String? phase; String? message; + + @override + String toString() { + var str = ' [$phase]\n\n'; + str += message ??= ''; + return str; + } }