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); });