mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-04-22 08:43:55 +08:00
fix tar finding on windows using the wrong tar
This commit is contained in:
parent
7d0857fb6f
commit
283942680f
1 changed files with 0 additions and 15 deletions
15
dist/restore/index.js
vendored
15
dist/restore/index.js
vendored
|
@ -5180,21 +5180,6 @@ const utils = __importStar(__webpack_require__(15));
|
||||||
const constants_1 = __webpack_require__(931);
|
const constants_1 = __webpack_require__(931);
|
||||||
function getTarPath(args, compressionMethod) {
|
function getTarPath(args, compressionMethod) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const IS_WINDOWS = process.platform === 'win32';
|
|
||||||
if (IS_WINDOWS) {
|
|
||||||
const systemTar = `${process.env['windir']}\\System32\\tar.exe`;
|
|
||||||
if (compressionMethod !== constants_1.CompressionMethod.Gzip) {
|
|
||||||
// We only use zstandard compression on windows when gnu tar is installed due to
|
|
||||||
// a bug with compressing large files with bsdtar + zstd
|
|
||||||
//args.push('--force-local');
|
|
||||||
}
|
|
||||||
else if (fs_1.existsSync(systemTar)) {
|
|
||||||
return systemTar;
|
|
||||||
}
|
|
||||||
else if (yield utils.isGnuTarInstalled()) {
|
|
||||||
// args.push('--force-local');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return yield io.which('tar', true);
|
return yield io.which('tar', true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue