Logging improvement

pull/310/head
Frostebite 2021-12-28 00:11:09 +00:00
parent ae5f1479a9
commit efedce3b10
3 changed files with 5 additions and 5 deletions

4
dist/index.js vendored
View File

@ -491,13 +491,13 @@ class Caching {
} }
if (fs_1.default.existsSync(cacheSelection)) { if (fs_1.default.existsSync(cacheSelection)) {
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`); yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`);
cloud_runner_logger_1.default.logCli(`Library cache exists`); cloud_runner_logger_1.default.logCli(`cache item exists`);
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${destinationFolder}"`); yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${destinationFolder}"`);
console_1.assert(fs_1.default.existsSync(destinationFolder)); console_1.assert(fs_1.default.existsSync(destinationFolder));
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`); yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`);
} }
else { else {
cloud_runner_logger_1.default.logCli(`Library cache doesn't exist`); cloud_runner_logger_1.default.logCli(`cache item doesn't exist`);
if (cacheSelection !== ``) { if (cacheSelection !== ``) {
throw new Error(`Failed to get library cache, but cache hit was found: ${cacheSelection}`); throw new Error(`Failed to get library cache, but cache hit was found: ${cacheSelection}`);
} }

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -42,12 +42,12 @@ export class Caching {
} }
if (fs.existsSync(cacheSelection)) { if (fs.existsSync(cacheSelection)) {
await CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`); await CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`);
CloudRunnerLogger.logCli(`Library cache exists`); CloudRunnerLogger.logCli(`cache item exists`);
await CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${destinationFolder}"`); await CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${destinationFolder}"`);
assert(fs.existsSync(destinationFolder)); assert(fs.existsSync(destinationFolder));
await CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`); await CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`);
} else { } else {
CloudRunnerLogger.logCli(`Library cache doesn't exist`); CloudRunnerLogger.logCli(`cache item doesn't exist`);
if (cacheSelection !== ``) { if (cacheSelection !== ``) {
throw new Error(`Failed to get library cache, but cache hit was found: ${cacheSelection}`); throw new Error(`Failed to get library cache, but cache hit was found: ${cacheSelection}`);
} }