mirror of
https://github.com/actions/setup-go.git
synced 2025-04-23 17:40:50 +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 cachePaths = await getCacheDirectoryPath(packageManagerInfo);
|
||||||
|
|
||||||
const dependencyFilePath = cacheDependencyPath
|
let dependencyFilePath: string
|
||||||
? cacheDependencyPath
|
try {
|
||||||
: findDependencyFile(packageManagerInfo);
|
dependencyFilePath = cacheDependencyPath
|
||||||
|
? cacheDependencyPath
|
||||||
|
: findDependencyFile(packageManagerInfo);
|
||||||
|
} catch (e) {
|
||||||
|
core.info(e);
|
||||||
|
core.setOutput(Outputs.CacheHit, false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
const fileHash = await glob.hashFiles(dependencyFilePath);
|
const fileHash = await glob.hashFiles(dependencyFilePath);
|
||||||
|
|
||||||
if (!fileHash) {
|
if (!fileHash) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue