Skip to content

Commit

Permalink
Update lib/utils/FileCache.js
Browse files Browse the repository at this point in the history
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
  • Loading branch information
kaorun343 and ybiquitous committed Sep 25, 2022
1 parent 741eb21 commit 7a718a4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/utils/FileCache.js
Expand Up @@ -23,6 +23,11 @@ class FileCache {
cwd = process.cwd(),
hashOfConfig = DEFAULT_HASH,
) {
if (![DEFAULT_CACHE_STRATEGY, CACHE_STRATEGY_CONTENT].includes(cacheStrategy)) {
throw new Error(
`"${cacheStrategy}" cache strategy is unsupported. Specify either "${DEFAULT_CACHE_STRATEGY}" or "${CACHE_STRATEGY_CONTENT}"`,
);
}
const cacheFile = path.resolve(getCacheFile(cacheLocation, cwd));
const useCheckSum = cacheStrategy !== DEFAULT_CACHE_STRATEGY;

Expand Down

0 comments on commit 7a718a4

Please sign in to comment.