Logging improvement
parent
ae5f1479a9
commit
efedce3b10
|
|
@ -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}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -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}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue