This commit is contained in:
Dmitry Shibanov 2021-09-14 18:33:29 +03:00
parent b44d7a8d91
commit bed7d19f37
3 changed files with 24 additions and 7 deletions

9
dist/setup/index.js vendored
View file

@ -36805,6 +36805,8 @@ const cache = __importStar(__webpack_require__(692));
const glob = __importStar(__webpack_require__(281));
const core = __importStar(__webpack_require__(470));
const fs = __importStar(__webpack_require__(747));
const path = __importStar(__webpack_require__(622));
const os = __importStar(__webpack_require__(87));
class CacheDistributor {
constructor(packageManager) {
this.packageManager = packageManager;
@ -36829,7 +36831,12 @@ class CacheDistributor {
});
}
isCacheDirectoryExists(cacheDirectory) {
const result = cacheDirectory.reduce((previousValue, currentValue) => previousValue || fs.existsSync(currentValue), false);
const result = cacheDirectory.reduce((previousValue, currentValue) => {
const resolvePath = currentValue.includes('~')
? path.join(currentValue.slice(1), os.homedir())
: currentValue;
return previousValue || fs.existsSync(currentValue);
}, false);
return result;
}
saveCache() {