anchor.diff:      ? Platform.environment['LOCALAPPDATA']
       : Platform.environment['HOME'];
   
  +final _package_config = path.join('.dart_tool', 'package_config.json');
  +
   Future<CloneResult> _clone(String repo) async {
     final name =
         _trimName(repo.split('https://github.com/').last.replaceAll('/', '_'));
     final cloneDir = path.join(_appDir, name);
     var result;
     if (Directory(cloneDir).existsSync()) {
  +    if (!updateExistingClones) {
  +      return CloneResult(0, cloneDir);
  +    }
       print('Repository "$name" exists -- pulling to update');
       result = await Process.run('git', ['pull'], workingDirectory: cloneDir);
     } else {
       print('Cloning $repo to $cloneDir');
       result = await Process.run('git', ['clone', '$repo.git', cloneDir]);
     }
  -  return CloneResult(result, cloneDir);
  +  return CloneResult(result.exitCode, cloneDir, msg: result.stderr);
   }
   
   Future<String> _getBody(String url) async => (await _getResponse(url)).body;
  
positive.code: Future<http.Response> _getResponse(String url) async => _client
      .get(url, headers: const {'User-Agent': 'dart.pkg.completion_metrics'});
  
  Future<ProcessResult> _runPub(String dir) async =>
      await Process.run('flutter', ['pub', 'get'], workingDirectory: dir);
  
  String _trimName(String name) {
    while (name.endsWith('/')) {
  
negative.code:   }
  
    print('Cloning repositories...');
    if (!updateExistingClones) {
      print('(Skipping git updates.)');
    }
    for (var repo in repos) {
      final clone = await _clone(_trimName(repo));
      if (clone.exitCode != 0) {
        print('Error cloning $repo: ${clone.msg}');
      } else {
        await _runPub(clone.directory);
        if (recurseForDependencies) {
          for (var dir in Directory(clone.directory).listSync(recursive: true)) {
            await _runPubGet(dir);
          }
        }
      }
    }
  }
  
  /// Whether to force a pub get if a package config is found.
  final forcePubUpdate = false;
  
  /// Whether to recurse into projects when installing dependencies.
  final recurseForDependencies = true;
  
  /// Whether to update existing clones.
  final updateExistingClones = false;
  
  final _appDir =
      path.join(_homeDir, 'completion_metrics', 'third_party', 'apps');
  