chore(shorebird_cli): remove upgrade suggestion from shorebird init (#728)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user