move results directory then rename fix

pull/310/head
Frostebite 2022-01-24 21:56:02 +00:00
parent c2b658a8d3
commit 080a4631a4
3 changed files with 7 additions and 3 deletions

4
dist/index.js vendored
View File

@ -604,7 +604,9 @@ class Caching {
remote_client_logger_1.RemoteClientLogger.log(`cache item extracted to ${fullDestination}`);
console_1.assert(`${fs_1.default.existsSync(fullDestination)}`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv "${fullDestination}" "${destinationFolder}/.."`);
fs_1.default.rmdirSync(destinationFolder);
if (fs_1.default.existsSync(destinationFolder)) {
fs_1.default.rmdirSync(destinationFolder);
}
fs_1.default.renameSync(`${destinationFolder}/../${resultsDirectory}`, destinationFolder);
}
else {

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -78,7 +78,9 @@ export class Caching {
RemoteClientLogger.log(`cache item extracted to ${fullDestination}`);
assert(`${fs.existsSync(fullDestination)}`);
await CloudRunnerSystem.Run(`mv "${fullDestination}" "${destinationFolder}/.."`);
fs.rmdirSync(destinationFolder);
if (fs.existsSync(destinationFolder)) {
fs.rmdirSync(destinationFolder);
}
fs.renameSync(`${destinationFolder}/../${resultsDirectory}`, destinationFolder);
} else {
RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);