mirror of
https://github.com/actions/setup-go.git
synced 2025-07-17 04:25:14 -06:00
Format files according to Prettier rules and build
This commit is contained in:
parent
25a133c257
commit
53f5d5ec02
7 changed files with 120128 additions and 6377 deletions
|
@ -7,8 +7,8 @@ export interface PackageManagerInfo {
|
|||
}
|
||||
|
||||
export const defaultPackageManager: PackageManagerInfo = {
|
||||
goSumFilePattern: 'go.sum',
|
||||
getCacheFolderCommand: 'go env GOMODCACHE',
|
||||
goSumFilePattern: 'go.sum',
|
||||
getCacheFolderCommand: 'go env GOMODCACHE'
|
||||
};
|
||||
|
||||
export const getCommandOutput = async (toolCommand: string) => {
|
||||
|
@ -29,17 +29,15 @@ export const getCommandOutput = async (toolCommand: string) => {
|
|||
};
|
||||
|
||||
export const getPackageManagerInfo = async () => {
|
||||
|
||||
return defaultPackageManager;
|
||||
|
||||
};
|
||||
|
||||
export const getCacheDirectoryPath = async (
|
||||
packageManagerInfo: PackageManagerInfo,
|
||||
packageManagerInfo: PackageManagerInfo
|
||||
) => {
|
||||
const stdout = await getCommandOutput(
|
||||
packageManagerInfo.getCacheFolderCommand
|
||||
);
|
||||
);
|
||||
|
||||
if (!stdout) {
|
||||
throw new Error(`Could not get cache folder path.`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue