Fix missing extension in temporary tarball path
For some reason, this was breaking archive extraction on Windows only on Forgejo Actions (not GitHub Actions).
This commit is contained in:
@@ -248,15 +248,10 @@ function parseZigString(raw) {
|
||||
return result;
|
||||
}
|
||||
|
||||
async function getTarballCachePath() {
|
||||
return path.join(process.env['RUNNER_TEMP'], await getTarballName());
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getVersion,
|
||||
getTarballName,
|
||||
getTarballExt,
|
||||
getCachePrefix,
|
||||
getZigCachePath,
|
||||
getTarballCachePath,
|
||||
};
|
||||
|
||||
@@ -85,14 +85,15 @@ async function downloadTarball(tarball_filename) {
|
||||
|
||||
async function retrieveTarball(tarball_name, tarball_ext) {
|
||||
const cache_key = `setup-zig-tarball-${tarball_name}`;
|
||||
const tarball_cache_path = await common.getTarballCachePath();
|
||||
const tarball_basename = `${tarball_name}${tarball_ext}`;
|
||||
const tarball_cache_path = path.join(process.env['RUNNER_TEMP'], tarball_basename);
|
||||
|
||||
if (await cache.restoreCache([tarball_cache_path], cache_key)) {
|
||||
return tarball_cache_path;
|
||||
}
|
||||
|
||||
core.info(`Cache miss. Fetching Zig ${await common.getVersion()}`);
|
||||
const downloaded_path = await downloadTarball(`${tarball_name}${tarball_ext}`);
|
||||
const downloaded_path = await downloadTarball(tarball_basename);
|
||||
await fs.copyFile(downloaded_path, tarball_cache_path)
|
||||
await cache.saveCache([tarball_cache_path], cache_key);
|
||||
return tarball_cache_path;
|
||||
|
||||
Reference in New Issue
Block a user