mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-04-18 22:47:05 -05:00
Compute correct cacheDependencyPathHash
This commit is contained in:
parent
e4c1a1723b
commit
4203354a33
3 changed files with 6 additions and 6 deletions
4
dist/save-cache/index.js
generated
vendored
4
dist/save-cache/index.js
generated
vendored
|
@ -82798,7 +82798,6 @@ const platforms_1 = __nccwpck_require__(6005);
|
|||
exports.STATE_CACHE_KEY = 'cache-key';
|
||||
exports.STATE_CACHE_MATCHED_KEY = 'cache-matched-key';
|
||||
const CACHE_VERSION = '1';
|
||||
const fullCacheDependencyGlob = `${process.env['GITHUB_WORKSPACE']}${path_1.default.sep}${inputs_1.cacheDependencyGlob}`;
|
||||
function restoreCache(version) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const cacheKey = yield computeKeys(version);
|
||||
|
@ -82821,7 +82820,8 @@ exports.restoreCache = restoreCache;
|
|||
function computeKeys(version) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let cacheDependencyPathHash = '-';
|
||||
if (fullCacheDependencyGlob !== '') {
|
||||
if (inputs_1.cacheDependencyGlob !== '') {
|
||||
const fullCacheDependencyGlob = `${process.env['GITHUB_WORKSPACE']}${path_1.default.sep}${inputs_1.cacheDependencyGlob}`;
|
||||
cacheDependencyPathHash += yield glob.hashFiles(fullCacheDependencyGlob);
|
||||
if (cacheDependencyPathHash === '-') {
|
||||
throw new Error(`No file in ${process.cwd()} matched to [${inputs_1.cacheDependencyGlob}], make sure you have checked out the target repository`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue