installXcodeproj function

Future<void> installXcodeproj()

Tries to install the xcodeproj gem.

Implementation

Future<void> installXcodeproj() async {
  Logger.info('Trying to install xcodeproj gem...');

  final result = await Process.run('gem', ['install', 'xcodeproj']);

  if (result.exitCode != 0) {
    Logger.error('Failed to install xcodeproj.');
    Logger.error('Error: ${result.stderr}');
    Logger.info('Try running: sudo gem install xcodeproj');
    exit(1);
  }
  Logger.success('xcodeproj installed');
}