mirror of
https://github.com/actions/setup-go.git
synced 2026-02-03 17:54:56 +08:00
Update default Go module caching to use go.mod (#705)
* Update module cache to use go.mod as key * Fix typo * Revise breaking changes in README for V6 Updated breaking changes section with enhanced formatting and clarified toolchain management details.
This commit is contained in:
@@ -55,8 +55,8 @@ const findDependencyFile = (packageManager: PackageManagerInfo) => {
|
||||
const workspace = process.env.GITHUB_WORKSPACE!;
|
||||
const rootContent = fs.readdirSync(workspace);
|
||||
|
||||
const goSumFileExists = rootContent.includes(dependencyFile);
|
||||
if (!goSumFileExists) {
|
||||
const goModFileExists = rootContent.includes(dependencyFile);
|
||||
if (!goModFileExists) {
|
||||
throw new Error(
|
||||
`Dependencies file is not found in ${workspace}. Supported file pattern: ${dependencyFile}`
|
||||
);
|
||||
|
||||
@@ -9,7 +9,7 @@ export interface PackageManagerInfo {
|
||||
|
||||
export const supportedPackageManagers: SupportedPackageManagers = {
|
||||
default: {
|
||||
dependencyFilePattern: 'go.sum',
|
||||
dependencyFilePattern: 'go.mod',
|
||||
cacheFolderCommandList: ['go env GOMODCACHE', 'go env GOCACHE']
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user