runProjectCommand method
Runs a shell command in the project directory.
Implementation
Future<ProcessResult> runProjectCommand(
String command, {
String? workDir,
}) async {
final parts = command.split(RegExp(r'\s+'));
if (parts.isEmpty) {
throw ArgumentError('Empty command');
}
return Process.run(
parts.first,
parts.sublist(1),
workingDirectory: workDir,
stdoutEncoding: utf8,
stderrEncoding: utf8,
);
}