Skip to content

Commit

Permalink
Fix: Success message printed on exception (fluttercommunity#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
happy-san committed Jul 28, 2021
1 parent 4ea5aa1 commit d0f6dab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ Future<void> createIconsFromArguments(List<String> arguments) async {
if (!hasFlavors) {
try {
createIconsFromConfig(yamlConfig);
print('\n✓ Successfully generated launcher icons');
} catch (e) {
stderr.writeln('\n✕ Could not generate launcher icons');
stderr.writeln(e);
exit(2);
} finally {
print('\n✓ Successfully generated launcher icons');
}
} else {
try {
Expand All @@ -72,11 +72,11 @@ Future<void> createIconsFromArguments(List<String> arguments) async {
loadConfigFile(flavorConfigFile(flavor), flavorConfigFile(flavor));
await createIconsFromConfig(yamlConfig, flavor);
}
print('\n✓ Successfully generated launcher icons for flavors');
} catch (e) {
stderr.writeln('\n✕ Could not generate launcher icons for flavors');
stderr.writeln(e);
exit(2);
} finally {
print('\n✓ Successfully generated launcher icons for flavors');
}
}
}
Expand Down

0 comments on commit d0f6dab

Please sign in to comment.