Skip to content

Commit

Permalink
legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
renancaraujo committed Jan 5, 2023
1 parent a1db9ee commit 5566fb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
7 changes: 3 additions & 4 deletions lib/src/commands/create/create_legacy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ class LegacyCreateCommand extends CreateSubCommand
}

@override
String get description =>
'Creates a new very good project in the specified directory.';
String get description => deprecatedUsage;

@override
String get name => 'legacy';
Expand All @@ -137,10 +136,10 @@ class LegacyCreateCommand extends CreateSubCommand
bool get hidden => true;

@override
String get invocation => '${yellow.wrap(deprecatedUsage)}';
String get usage => deprecatedUsage;

@override
String get usage => parent!.usage;
String get invocation => '${yellow.wrap(deprecatedUsage)}';

/// The deprecated message to display when the command is invoked.
String get deprecatedUsage => 'Deprecated usage: '
Expand Down
12 changes: 2 additions & 10 deletions test/src/commands/create/create_legacy_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,8 @@ import '../../../helpers/helpers.dart';

const expectedUsage = [
// ignore: no_adjacent_strings_in_list
'Creates a new very good project in the specified directory.\n'
'\n'
'Usage: very_good create <subcommand> [arguments]\n'
'-h, --help Print this usage information.\n'
'\n'
'Available subcommands:\n'
' flutter_app Creates a new very good Flutter app in the specified '
'directory.\n'
'\n'
'Run "very_good help" to see global options.'
"Deprecated usage: run 'very_good create --help' "
'to see the available options.'
];

const pubspec = '''
Expand Down

0 comments on commit 5566fb8

Please sign in to comment.