From 729dfee607f268b6df6ee4d0915bda98ac67564c Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Thu, 25 May 2023 09:53:55 -0700 Subject: [PATCH] fix(shorebird_cli): `shorebird init` flavor detection progress (#550) --- packages/shorebird_cli/lib/src/commands/init_command.dart | 2 +- packages/shorebird_cli/test/src/commands/init_command_test.dart | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/shorebird_cli/lib/src/commands/init_command.dart b/packages/shorebird_cli/lib/src/commands/init_command.dart index e93cd419..23b98c63 100644 --- a/packages/shorebird_cli/lib/src/commands/init_command.dart +++ b/packages/shorebird_cli/lib/src/commands/init_command.dart @@ -74,7 +74,7 @@ If you want to reinitialize Shorebird, please run "shorebird init --force".'''); productFlavors = await extractProductFlavors(Directory.current.path); detectFlavorsProgress.complete(); } catch (error) { - detectFlavorsProgress.fail(); + detectFlavorsProgress.complete(); logger.detail('Unable to extract product flavors: $error'); } diff --git a/packages/shorebird_cli/test/src/commands/init_command_test.dart b/packages/shorebird_cli/test/src/commands/init_command_test.dart index 773d59de..fce7b4a3 100644 --- a/packages/shorebird_cli/test/src/commands/init_command_test.dart +++ b/packages/shorebird_cli/test/src/commands/init_command_test.dart @@ -328,6 +328,8 @@ If you want to reinitialize Shorebird, please run "shorebird init --force".''', 'Unable to extract product flavors: Exception: error\noops', ), ).called(1); + verify(() => progress.complete()).called(1); + verifyNever(() => progress.fail(any())); expect(exitCode, ExitCode.success.code); });