Skip to content

Commit

Permalink
throw binary error
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobaraujo7 committed Sep 7, 2022
1 parent aff08df commit 5e5c894
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/src/commands/generate_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ class GenerateCommand extends Command {
},
);

// throw error
if (configProcessResult.exitCode > 0) {
final json = jsonDecode(configProcessResult.stderr);
throw json['message'];
}

// Parse config result.
final GetConfigResult configResult = GetConfigResult.fromJson(
jsonDecode(configProcessResult.stdout as String) as Map<String, dynamic>,
Expand Down

0 comments on commit 5e5c894

Please sign in to comment.