mirror of
https://github.com/actions/setup-go.git
synced 2025-05-04 14:14:34 +00:00
Allow to use only GOCACHE for cache (#305)
This commit is contained in:
committed by
GitHub
parent
bb5ff97ab9
commit
17106403fa
@ -34,19 +34,19 @@ export const getPackageManagerInfo = async (packageManager: string) => {
|
||||
export const getCacheDirectoryPath = async (
|
||||
packageManagerInfo: PackageManagerInfo
|
||||
) => {
|
||||
let pathList = await Promise.all(
|
||||
const pathList = await Promise.all(
|
||||
packageManagerInfo.cacheFolderCommandList.map(command =>
|
||||
getCommandOutput(command)
|
||||
)
|
||||
);
|
||||
|
||||
const emptyPaths = pathList.filter(item => !item);
|
||||
const cachePaths = pathList.filter(item => item);
|
||||
|
||||
if (emptyPaths.length) {
|
||||
if (!cachePaths.length) {
|
||||
throw new Error(`Could not get cache folder paths.`);
|
||||
}
|
||||
|
||||
return pathList;
|
||||
return cachePaths;
|
||||
};
|
||||
|
||||
export function isGhes(): boolean {
|
||||
|
Reference in New Issue
Block a user