Fix lib caching

pull/310/head
Frostebite 2021-12-27 19:51:29 +00:00
parent 368c390590
commit fc8ebaa5a1
3 changed files with 5 additions and 3 deletions

2
dist/index.js vendored
View File

@ -665,7 +665,7 @@ class SetupRemoteRepository {
fs_1.default.mkdirSync(libraryCacheFolder);
}
//Restore library cache
const latestLibraryCacheFile = yield remote_client_system_1.RemoteClientSystem.Run(`ls -t "${libraryCacheFolder}" | grep .zip$ | head -1`);
const latestLibraryCacheFile = yield (yield remote_client_system_1.RemoteClientSystem.Run(`ls -t "${libraryCacheFolder}" | grep .zip$ | head -1`)).replace(`\n`, ``);
cloud_runner_logger_1.default.logCli(`Checking if Library cache ${libraryCacheFolder}/${latestLibraryCacheFile} exists`);
process.chdir(libraryCacheFolder);
yield remote_client_system_1.RemoteClientSystem.Run(`ls -lh "${libraryCacheFolder}"`);

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -128,7 +128,9 @@ export class SetupRemoteRepository {
fs.mkdirSync(libraryCacheFolder);
}
//Restore library cache
const latestLibraryCacheFile = await RemoteClientSystem.Run(`ls -t "${libraryCacheFolder}" | grep .zip$ | head -1`);
const latestLibraryCacheFile = await (
await RemoteClientSystem.Run(`ls -t "${libraryCacheFolder}" | grep .zip$ | head -1`)
).replace(`\n`, ``);
CloudRunnerLogger.logCli(`Checking if Library cache ${libraryCacheFolder}/${latestLibraryCacheFile} exists`);
process.chdir(libraryCacheFolder);
await RemoteClientSystem.Run(`ls -lh "${libraryCacheFolder}"`);