function loadRunfilesManifest() {
  // On Windows, Bazel sets RUNFILES_MANIFEST_ONLY=1 and RUNFILES_MANIFEST_FILE.
  // On Linux and OSX RUNFILES_MANIFEST_FILE is not set and not available in the test
  // sandbox but outside of the test sandbox (when executing with `bazel run` for example)
  // we can look for the MANIFEST file and load it. This allows us to exercise the
  // manifest loading code path on Linux and OSX.
  const runfilesManifestFile = path.posix.join(process.env.RUNFILES_DIR, 'MANIFEST');
  const isRunfilesManifestFile = isFile(runfilesManifestFile);
  if (process.env.RUNFILES_MANIFEST_ONLY === '1' || (TEST_MANIFEST && isRunfilesManifestFile)) {
    const manifestPath = process.env.RUNFILES_MANIFEST_FILE || runfilesManifestFile;
    const runfilesManifest = Object.create(null);
    const input = fs.readFileSync(manifestPath, {encoding: 'utf-8'});
    for (const line of input.split('\n')) {
      if (!line) continue;
      const [runfilesPath, realPath] = line.split(' ');
      runfilesManifest[runfilesPath] = realPath;
    }
    return runfilesManifest;
  } else {
    return undefined;
  }
}
/**
 * Loads the Bazel MANIFEST file and returns its contents as an object
 * if is found. Returns undefined if there is no MANIFEST file.
 */
Loads the Bazel MANIFEST file and returns its contents as an object
if is found. Returns undefined if there is no MANIFEST file.
Loads the Bazel MANIFEST file and returns its contents as an object if is found . Returns undefined if there is no MANIFEST file .
function loadRunfilesManifest() {
  const runfilesManifestFile = path.posix.join(process.env.RUNFILES_DIR, 'MANIFEST');
  const isRunfilesManifestFile = isFile(runfilesManifestFile);
  if (process.env.RUNFILES_MANIFEST_ONLY === '1' || (TEST_MANIFEST && isRunfilesManifestFile)) {
    const manifestPath = process.env.RUNFILES_MANIFEST_FILE || runfilesManifestFile;
    const runfilesManifest = Object.create(null);
    const input = fs.readFileSync(manifestPath, {encoding: 'utf-8'});
    for (const line of input.split('\n')) {
      if (!line) continue;
      const [runfilesPath, realPath] = line.split(' ');
      runfilesManifest[runfilesPath] = realPath;
    }
    return runfilesManifest;
  } else {
    return undefined;
  }
}
function loadRunfilesManifest ( ) { const runfilesManifestFile = path . posix . join ( process . env . RUNFILES_DIR , 'MANIFEST' ) ; const isRunfilesManifestFile = isFile ( runfilesManifestFile ) ; if ( process . env . RUNFILES_MANIFEST_ONLY === '1' || ( TEST_MANIFEST && isRunfilesManifestFile ) ) { const manifestPath = process . env . RUNFILES_MANIFEST_FILE || runfilesManifestFile ; const runfilesManifest = Object . create ( null ) ; const input = fs . readFileSync ( manifestPath , { encoding : 'utf-8' } ) ; for ( const line of input . split ( '\n' ) ) { if ( ! line ) continue ; const [ runfilesPath , realPath ] = line . split ( ' ' ) ; runfilesManifest [ runfilesPath ] = realPath ; } return runfilesManifest ; } else { return undefined ; } }
Loads the Bazel MANIFEST file and returns its contents as an object
 if is found.
Loads the Bazel MANIFEST file and returns its contents as an object if is found .
// On Windows, Bazel sets RUNFILES_MANIFEST_ONLY=1 and RUNFILES_MANIFEST_FILE. // On Linux and OSX RUNFILES_MANIFEST_FILE is not set and not available in the test // sandbox but outside of the test sandbox (when executing with `bazel run` for example) // we can look for the MANIFEST file and load it. This allows us to exercise the // manifest loading code path on Linux and OSX.