Skip to content

Commit e3fb95a

Browse files
authored
Warn instead of fail for no-dependency-glob (#200)
Closes: #199
1 parent 2af22b5 commit e3fb95a

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

dist/save-cache/index.js

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup/index.js

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cache/restore-cache.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,11 @@ async function computeKeys(version: string): Promise<string> {
4343
);
4444
cacheDependencyPathHash += await hashFiles(cacheDependencyGlob, true);
4545
if (cacheDependencyPathHash === "-") {
46-
throw new Error(
47-
`No file matched to [${cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`,
46+
core.warning(
47+
`No file matched to [${cacheDependencyGlob.split("\n").join(",")}]. The cache will never get invalidated. Make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`,
4848
);
4949
}
50-
} else {
51-
cacheDependencyPathHash += "no-dependency-glob";
50+
cacheDependencyPathHash = "-no-dependency-glob";
5251
}
5352
const suffix = cacheSuffix ? `-${cacheSuffix}` : "";
5453
const pythonVersion = await getPythonVersion();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy