diff --git a/packages/shorebird_cli/lib/src/shorebird_cli_command_runner.dart b/packages/shorebird_cli/lib/src/shorebird_cli_command_runner.dart index 81c5fafa..992e6171 100644 --- a/packages/shorebird_cli/lib/src/shorebird_cli_command_runner.dart +++ b/packages/shorebird_cli/lib/src/shorebird_cli_command_runner.dart @@ -203,7 +203,7 @@ Engine • revision ${shorebirdEnv.shorebirdEngineRevision}'''); exitCode = error.exitCode; } catch (error, stackTrace) { logger - ..err('$error') + ..detail('$error') ..detail('$stackTrace'); exitCode = ExitCode.software.code; } diff --git a/packages/shorebird_cli/test/src/shorebird_cli_command_runner_test.dart b/packages/shorebird_cli/test/src/shorebird_cli_command_runner_test.dart index 36e3aa22..603fb477 100644 --- a/packages/shorebird_cli/test/src/shorebird_cli_command_runner_test.dart +++ b/packages/shorebird_cli/test/src/shorebird_cli_command_runner_test.dart @@ -260,15 +260,16 @@ Engine • revision $shorebirdEngineRevision''', }); group('on command failure', () { - test('logs a stack trace using detail', () async { - // This will fail due to the release android command missing scoped - // dependencies. + test('logs error and stack trace using detail', () async { + // This will fail with a StateError due to the release android command + // missing scoped dependencies. // Note: the --verbose flag is here for illustrative purposes only. // Because logger is a mock, setting the log level in code does // nothing. await runWithOverrides( () => commandRunner.run(['release', 'android', '--verbose']), ); + verify(() => logger.detail(any(that: contains('Bad state')))).called(1); verify(() => logger.detail(any(that: contains('#0')))).called(1); });