From 604de918068d44bf4eea4319b611f34fb265a8b5 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Wed, 16 Oct 2024 11:38:18 -0400 Subject: [PATCH] fix: log unknown errors to err instead of detail --- .../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 b9aff0d16..3234f8e5a 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 51a57cd0c..1d124d431 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); });