fetchPackage function

Future<String> fetchPackage (
  1. String uri
)

Implementation

Future<String> fetchPackage(String uri) async {
  // Config.ppLogger.v('fetchPackage $uri');
  if (Config.verbose) {
    Config.logger.i('fetching $uri from pub.dev...');
  }
  try {
    await runCmd(PubCmd(['cache', 'add', uri]), verbose: false);
  } catch (e) {
    Config.debugLogger.e(e);
    exit(0);
  }
  return uri;
}