Skip to content

Commit

Permalink
feat: prevent mineral empty commands
Browse files Browse the repository at this point in the history
  • Loading branch information
LeadcodeDev committed Nov 3, 2024
1 parent 0636565 commit f5e6def
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 2.0.0-dev.3
- Change `mineral_cli` wording to `main` in presets
- Prevent fatal error when `mineral.commands` is empty in `pubspec.yaml`

## 2.0.0-dev.2
- Rework the whole library with newer [`commander_ui`](https://pub.dev/packages/commander_ui)
Expand Down
Binary file added bin/cli.exe
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ final class MineralPubSpecContext {
});

factory MineralPubSpecContext.fromJson(String root, YamlMap json) {
final List<YamlMap> commands = json['commands'] ?? [];
final YamlList commands = json['commands'] ?? [];

final List<MineralCommand> commandsList = commands.fold([], (acc, element) {
final command = MineralCommand.fromJson(root, element);
Expand Down

0 comments on commit f5e6def

Please sign in to comment.