mirror of
https://github.com/actions/setup-go.git
synced 2025-04-24 01:50:52 +00:00
fix cache throwing error on missing lockfile
This commit is contained in:
parent
a3d889c34c
commit
4e210ad7a2
1 changed files with 10 additions and 3 deletions
|
@ -18,9 +18,16 @@ export const restoreCache = async (
|
|||
|
||||
const cachePaths = await getCacheDirectoryPath(packageManagerInfo);
|
||||
|
||||
const dependencyFilePath = cacheDependencyPath
|
||||
? cacheDependencyPath
|
||||
: findDependencyFile(packageManagerInfo);
|
||||
let dependencyFilePath: string
|
||||
try {
|
||||
dependencyFilePath = cacheDependencyPath
|
||||
? cacheDependencyPath
|
||||
: findDependencyFile(packageManagerInfo);
|
||||
} catch (e) {
|
||||
core.info(e);
|
||||
core.setOutput(Outputs.CacheHit, false);
|
||||
return;
|
||||
}
|
||||
const fileHash = await glob.hashFiles(dependencyFilePath);
|
||||
|
||||
if (!fileHash) {
|
||||
|
|
Loading…
Add table
Reference in a new issue