Skip to content

Commit 5f338b0

Browse files
authored
fix: remove command always showing help instead of executing (#823)
The help flag check used `helpArg != null` but addFlag always returns a bool (false when not specified), never null. This caused the remove command to always print help and exit without executing. Changed to `helpArg == true` to match the same pattern used in create.dart. Fixes #822, Fixes #804, Fixes #786
1 parent b4a310c commit 5f338b0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

bin/remove.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ void main(List<String> args) {
2525

2626
final parsedArgs = parser.parse(args);
2727

28-
final helpArg = parsedArgs[ArgEnums.help.name];
28+
final helpArg = parsedArgs[ArgEnums.help.name] as bool?;
2929

30-
if (helpArg != null) {
30+
if (helpArg == true) {
3131
// ignore_for_file: avoid_print
3232
print(parser.usage);
3333
return;

0 commit comments

Comments
 (0)