From 5aedab5e5344ebe12e6b7042e559e14ff8f9b05d Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Wed, 16 Oct 2024 12:58:17 -0400 Subject: [PATCH] fix: log unknown errors to err instead of detail (#2545) --- .../shorebird_cli/lib/src/shorebird_cli_command_runner.dart | 2 +- .../test/src/shorebird_cli_command_runner_test.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 b9aff0d1..3234f8e5 100644 --- a/packages/shorebird_cli/lib/src/shorebird_cli_command_runner.dart +++ b/packages/shorebird_cli/lib/src/shorebird_cli_command_runner.dart @@ -210,7 +210,7 @@ Engine • revision ${shorebirdEnv.shorebirdEngineRevision}'''); return ExitCode.usage.code; } catch (error, stackTrace) { logger - ..detail('$error') + ..err('$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 51a57cd0..1d124d43 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 @@ -272,7 +272,7 @@ Engine • revision $shorebirdEngineRevision''', await runWithOverrides( () => commandRunner.run(['release', 'android', '--verbose']), ); - verify(() => logger.detail(any(that: contains('Bad state')))).called(1); + verify(() => logger.err(any(that: contains('Bad state')))).called(1); verify(() => logger.detail(any(that: contains('#0')))).called(1); });