Add caching of the compiler's temporary files

This commit is contained in:
Ivan Zosimov 2022-04-18 17:57:33 +02:00
parent c8ed3f974d
commit 661954d154
6 changed files with 814 additions and 796 deletions

View file

@ -34,15 +34,19 @@ export const getPackageManagerInfo = async (packageManager: string) => {
export const getCacheDirectoryPath = async (
packageManagerInfo: PackageManagerInfo
) => {
const stdout = await getCommandOutput(
packageManagerInfo.getCacheFolderCommand
);
let pathList: string[] = [];
if (!stdout) {
throw new Error(`Could not get cache folder path.`);
for (let command of packageManagerInfo.cacheFolderCommandList) {
pathList.push(await getCommandOutput(command));
}
return stdout;
for (let path of pathList) {
if (!path) {
throw new Error(`Could not get cache folder paths.`);
}
}
return pathList;
};
export function isGhes(): boolean {