usingGit method

bool? usingGit(
  1. String packageRoot
)

Implementation

bool? usingGit(String packageRoot) {
  if (_usingGit == null) {
    // search up the tree for the .git directory
    var current = packageRoot;
    var found = false;
    while (current != rootPath && found == false) {
      found = Directory(join(current, '.git')).existsSync();
      current = dirname(current);
    }
    _usingGit = found;
  }

  return _usingGit;
}