diff --git a/packages/shorebird_cli/lib/src/commands/init_command.dart b/packages/shorebird_cli/lib/src/commands/init_command.dart index db2592f4a..7e7560b00 100644 --- a/packages/shorebird_cli/lib/src/commands/init_command.dart +++ b/packages/shorebird_cli/lib/src/commands/init_command.dart @@ -9,7 +9,6 @@ import 'package:shorebird_cli/src/shorebird_environment.dart'; import 'package:shorebird_cli/src/shorebird_flavor_mixin.dart'; import 'package:shorebird_cli/src/shorebird_java_mixin.dart'; import 'package:shorebird_cli/src/shorebird_validation_mixin.dart'; -import 'package:shorebird_code_push_client/shorebird_code_push_client.dart'; /// {@template init_command} /// @@ -103,11 +102,6 @@ If you want to reinitialize Shorebird, please run "shorebird init --force".'''); } else { appId = (await createApp(appName: displayName)).id; } - } on CodePushForbiddenException { - logger.err(''' -A paid account is required to create apps. -To upgrade, run ${lightCyan.wrap('shorebird account upgrade')}.'''); - return ExitCode.software.code; } catch (error) { logger.err('$error'); return ExitCode.software.code; 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 1bb6f875c..5c5724f2b 100644 --- a/packages/shorebird_cli/test/src/commands/init_command_test.dart +++ b/packages/shorebird_cli/test/src/commands/init_command_test.dart @@ -401,36 +401,6 @@ If you want to reinitialize Shorebird, please run "shorebird init --force".''', expect(exitCode, ExitCode.software.code); }); - test( - '''exits with code 70 and prints error if user does not have a paid account''', - () async { - final tempDir = Directory.systemTemp.createTempSync(); - File( - p.join(tempDir.path, 'pubspec.yaml'), - ).writeAsStringSync(pubspecYamlContent); - when( - () => codePushClient.createApp(displayName: any(named: 'displayName')), - ).thenThrow(CodePushForbiddenException(message: 'oh no')); - - final result = await IOOverrides.runZoned( - () => runWithOverrides(command.run), - getCurrentDirectory: () => tempDir, - ); - - expect(result, ExitCode.software.code); - - verify( - () => logger.err( - any( - that: stringContainsInOrder([ - 'A paid account is required to create apps', - 'shorebird account upgrade', - ]), - ), - ), - ); - }); - test('creates shorebird.yaml for an app without flavors', () async { final tempDir = Directory.systemTemp.createTempSync(); File(