mirror of
https://github.com/actions/setup-go.git
synced 2025-07-17 20:45:13 -06:00
build
This commit is contained in:
parent
6edd4406fa
commit
b6ceb1ec9f
4 changed files with 955 additions and 920 deletions
|
@ -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 notEmptyPaths = pathList.filter(item => item);
|
||||
|
||||
if (emptyPaths.length) {
|
||||
if (!notEmptyPaths.length) {
|
||||
throw new Error(`Could not get cache folder paths.`);
|
||||
}
|
||||
|
||||
return pathList;
|
||||
return notEmptyPaths;
|
||||
};
|
||||
|
||||
export function isGhes(): boolean {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue