runShell method

Future<void> runShell(
  1. String command, {
  2. String? workingDir,
})

Implementation

Future<void> runShell(String command, {String? workingDir}) async {
  print('🏃 Running: `$command`');
  try {
    await Shell(
      workingDirectory: workingDir ?? projectDir,
    ).run(command);
  } catch (e) {
    throw BuildException(
      'A command failed to execute.',
      fix:
          'Review the command output above to identify the cause of the failure.',
    );
  }
}