mirror of https://github.com/actions/setup-go.git
fix cache throwing error on missing lockfile
This commit is contained in:
parent
a3d889c34c
commit
4e210ad7a2
|
@ -18,9 +18,16 @@ export const restoreCache = async (
|
|||
|
||||
const cachePaths = await getCacheDirectoryPath(packageManagerInfo);
|
||||
|
||||
const dependencyFilePath = cacheDependencyPath
|
||||
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…
Reference in New Issue