mirror of
https://github.com/actions/setup-go.git
synced 2025-07-17 04:25:14 -06:00
Add caching of the compiler's temporary files
This commit is contained in:
parent
c8ed3f974d
commit
661954d154
6 changed files with 814 additions and 796 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue