function copyNpmPackage(packagePath) {
  const to = tmp.dirSync({keep: DEBUG, unsafeCleanup: !DEBUG}).name;
  const from = RUNFILES_MANIFEST ? RUNFILES_MANIFEST[packagePath] :
                                   path.posix.join(process.cwd(), '..', packagePath);
  if (!isDirectory(from)) {
    throw new Error(`npm package ${packagePath} not found at ${from}`);
  }
  copyFolderSync(from, to);
  return to;
}
/**
 * Helper function to copy a runfiles npm package to tmp.
 * This is necessary so that the npm package folder that is symlinked
 * into node_modules in the workspace under test is writtable as
 * yarn & npm may attempt to write files there.
 */
Helper function to copy a runfiles npm package to tmp.
This is necessary so that the npm package folder that is symlinked
into node_modules in the workspace under test is writtable as
yarn & npm may attempt to write files there.
Helper function to copy a runfiles npm package to tmp . This is necessary so that the npm package folder that is symlinked into node_modules in the workspace under test is writtable as yarn & npm may attempt to write files there .
function copyNpmPackage(packagePath) {
  const to = tmp.dirSync({keep: DEBUG, unsafeCleanup: !DEBUG}).name;
  const from = RUNFILES_MANIFEST ? RUNFILES_MANIFEST[packagePath] :
                                   path.posix.join(process.cwd(), '..', packagePath);
  if (!isDirectory(from)) {
    throw new Error(`npm package ${packagePath} not found at ${from}`);
  }
  copyFolderSync(from, to);
  return to;
}
function copyNpmPackage ( packagePath ) { const to = tmp . dirSync ( { keep : DEBUG , unsafeCleanup : ! DEBUG } ) . name ; const from = RUNFILES_MANIFEST ? RUNFILES_MANIFEST [ packagePath ] : path . posix . join ( process . cwd ( ) , '..' , packagePath ) ; if ( ! isDirectory ( from ) ) { throw new Error ( ` ${ packagePath } ${ from } ` ) ; } copyFolderSync ( from , to ) ; return to ; }
Helper function to copy a runfiles npm package to tmp.
Helper function to copy a runfiles npm package to tmp .