runCreateTask method
Runs the create task and returns the exit code
Implementation
Future<int> runCreateTask(
CommandTask<Process> task,
String projectDir,
) async {
final process = await task.run();
if (process != null) {
line();
await process.stdout.listenVerbose();
await process.stderr.listenErrors();
}
final exitCode = await process?.exitCode ?? 0;
if (exitCode != 0) {
throw ProjectCreationFailedException(exitCode: exitCode);
}
final String suggestions = _suggestions(projectDir);
return finishSuccesfuly(
'SUCCESS',
message: 'Project Created! 📦',
suggestion: suggestions,
);
}