protected function getBuildRoot() {

    $extra = $this->package->getExtra();
    $paths = isset($extra['installer-paths']) ? $extra['installer-paths'] : [];
    foreach ($paths as $path => $types) {
      if (in_array("type:drupal-core", $types)) {
        return str_replace('/core', '', $path);
      }
    }

    throw new InstallerPathsNotFoundException();
  }