async function resolveVolumeFile()

in lib/volumeConfigurationResolver.js [28:40]


async function resolveVolumeFile(provider, volumeFile) {
  const volumePath = provider.get(pcrVolumeMountVariable);
  if (!volumePath) {
    throw new Error(`Unable to resolve volume path ${volumeFile}, no defined ${pcrVolumeMountVariable}`);
  }
  const combined = path.resolve(volumePath, volumeFile);
  try {
    const contents = await fs.readFile(combined, 'utf8');
    return contents;
  } catch (error) {
    throw new Error(`Unable to resolve volume file ${volumeFile} from ${pcrVolumeMountVariable}: ${error}`);
  }
}