mirror of
https://github.com/actions/setup-go.git
synced 2025-04-24 18:02:15 +00:00
Add primaryKey check
This commit is contained in:
parent
fedff717b9
commit
2df757ebf1
2 changed files with 11 additions and 0 deletions
4
dist/cache-save/index.js
vendored
4
dist/cache-save/index.js
vendored
|
@ -60379,6 +60379,10 @@ const cachePackages = () => __awaiter(void 0, void 0, void 0, function* () {
|
|||
if (nonExistingPaths.length) {
|
||||
logWarning(`Cache folder path is retrieved but doesn't exist on disk: ${nonExistingPaths.join(', ')}`);
|
||||
}
|
||||
if (!primaryKey) {
|
||||
core.info('Primary key was not generated. Please check the log messages above for more errors or information');
|
||||
return;
|
||||
}
|
||||
if (primaryKey === state) {
|
||||
core.info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`);
|
||||
return;
|
||||
|
|
|
@ -59,6 +59,13 @@ const cachePackages = async () => {
|
|||
);
|
||||
}
|
||||
|
||||
if (!primaryKey) {
|
||||
core.info(
|
||||
'Primary key was not generated. Please check the log messages above for more errors or information'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (primaryKey === state) {
|
||||
core.info(
|
||||
`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`
|
||||
|
|
Loading…
Add table
Reference in a new issue