Debug cache extract

pull/310/head
Frostebite 2022-01-13 22:35:17 +00:00
parent bc58fb2ef4
commit 1785f41484
3 changed files with 7 additions and 7 deletions

6
dist/index.js vendored
View File

@ -615,17 +615,17 @@ class Caching {
remote_client_logger_1.RemoteClientLogger.log(`cache item exists ${cacheFolder}/${cacheSelection}.zip`); remote_client_logger_1.RemoteClientLogger.log(`cache item exists ${cacheFolder}/${cacheSelection}.zip`);
console_1.assert(`${fs_1.default.existsSync(destinationFolder)}`); console_1.assert(`${fs_1.default.existsSync(destinationFolder)}`);
console_1.assert(`${fs_1.default.existsSync(`${cacheSelection}.zip`)}`); console_1.assert(`${fs_1.default.existsSync(`${cacheSelection}.zip`)}`);
const fullDestination = path_1.default.join(process.cwd(), path_1.default.basename(destinationFolder)); const fullDestination = path_1.default.join(process.cwd(), path_1.default.basename(destinationFolder), `results`);
if (__1.Input.cloudRunnerTests) { if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${cacheFolder}`); yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${cacheFolder}`);
} }
yield extract_zip_1.default(`${cacheSelection}.zip`, { dir: `results` }); yield extract_zip_1.default(`${cacheSelection}.zip`, { dir: fullDestination });
if (__1.Input.cloudRunnerTests) { if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${fullDestination}`); yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${fullDestination}`);
} }
remote_client_logger_1.RemoteClientLogger.log(`cache item extracted to ${fullDestination}`); remote_client_logger_1.RemoteClientLogger.log(`cache item extracted to ${fullDestination}`);
console_1.assert(`${fs_1.default.existsSync(fullDestination)}`); console_1.assert(`${fs_1.default.existsSync(fullDestination)}`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv "results" "${destinationFolder}"`); yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv "${fullDestination}" "${destinationFolder}"`);
} }
else { else {
remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`); remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -100,17 +100,17 @@ export class Caching {
RemoteClientLogger.log(`cache item exists ${cacheFolder}/${cacheSelection}.zip`); RemoteClientLogger.log(`cache item exists ${cacheFolder}/${cacheSelection}.zip`);
assert(`${fs.existsSync(destinationFolder)}`); assert(`${fs.existsSync(destinationFolder)}`);
assert(`${fs.existsSync(`${cacheSelection}.zip`)}`); assert(`${fs.existsSync(`${cacheSelection}.zip`)}`);
const fullDestination = path.join(process.cwd(), path.basename(destinationFolder)); const fullDestination = path.join(process.cwd(), path.basename(destinationFolder), `results`);
if (Input.cloudRunnerTests) { if (Input.cloudRunnerTests) {
await CloudRunnerSystem.Run(`tree ${cacheFolder}`); await CloudRunnerSystem.Run(`tree ${cacheFolder}`);
} }
await extract(`${cacheSelection}.zip`, { dir: `results` }); await extract(`${cacheSelection}.zip`, { dir: fullDestination });
if (Input.cloudRunnerTests) { if (Input.cloudRunnerTests) {
await CloudRunnerSystem.Run(`tree ${fullDestination}`); await CloudRunnerSystem.Run(`tree ${fullDestination}`);
} }
RemoteClientLogger.log(`cache item extracted to ${fullDestination}`); RemoteClientLogger.log(`cache item extracted to ${fullDestination}`);
assert(`${fs.existsSync(fullDestination)}`); assert(`${fs.existsSync(fullDestination)}`);
await CloudRunnerSystem.Run(`mv "results" "${destinationFolder}"`); await CloudRunnerSystem.Run(`mv "${fullDestination}" "${destinationFolder}"`);
} else { } else {
RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`); RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);
if (cacheSelection !== ``) { if (cacheSelection !== ``) {