Correcting hook feature to evaluate before removal
parent
ee63808d54
commit
2d1c67732b
|
|
@ -573,7 +573,7 @@ class Caching {
|
||||||
throw error;
|
throw error;
|
||||||
});
|
});
|
||||||
archive.pipe(output);
|
archive.pipe(output);
|
||||||
archive.directory(path_1.default.resolve(`..`, path_1.default.basename(sourceFolder)), false);
|
archive.directory(sourceFolder, false);
|
||||||
archive.finalize();
|
archive.finalize();
|
||||||
});
|
});
|
||||||
console_1.assert(fs_1.default.existsSync(`${cacheKey}.zip`), 'cache zip exists');
|
console_1.assert(fs_1.default.existsSync(`${cacheKey}.zip`), 'cache zip exists');
|
||||||
|
|
@ -614,8 +614,6 @@ class Caching {
|
||||||
remote_client_logger_1.RemoteClientLogger.log(`cache item exists`);
|
remote_client_logger_1.RemoteClientLogger.log(`cache item exists`);
|
||||||
console_1.assert(`${fs_1.default.existsSync(destinationFolder)}`);
|
console_1.assert(`${fs_1.default.existsSync(destinationFolder)}`);
|
||||||
yield extract_zip_1.default(`${cacheSelection}.zip`, { dir: `${destinationFolder}` });
|
yield extract_zip_1.default(`${cacheSelection}.zip`, { dir: `${destinationFolder}` });
|
||||||
process.chdir(path_1.default.basename(destinationFolder));
|
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv "${path_1.default.basename(destinationFolder)}/*" "${path_1.default.resolve(`..`, `${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}`);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -56,7 +56,7 @@ export class Caching {
|
||||||
throw error;
|
throw error;
|
||||||
});
|
});
|
||||||
archive.pipe(output);
|
archive.pipe(output);
|
||||||
archive.directory(path.resolve(`..`, path.basename(sourceFolder)), false);
|
archive.directory(sourceFolder, false);
|
||||||
archive.finalize();
|
archive.finalize();
|
||||||
});
|
});
|
||||||
assert(fs.existsSync(`${cacheKey}.zip`), 'cache zip exists');
|
assert(fs.existsSync(`${cacheKey}.zip`), 'cache zip exists');
|
||||||
|
|
@ -99,10 +99,6 @@ export class Caching {
|
||||||
RemoteClientLogger.log(`cache item exists`);
|
RemoteClientLogger.log(`cache item exists`);
|
||||||
assert(`${fs.existsSync(destinationFolder)}`);
|
assert(`${fs.existsSync(destinationFolder)}`);
|
||||||
await extract(`${cacheSelection}.zip`, { dir: `${destinationFolder}` });
|
await extract(`${cacheSelection}.zip`, { dir: `${destinationFolder}` });
|
||||||
process.chdir(path.basename(destinationFolder));
|
|
||||||
await CloudRunnerSystem.Run(
|
|
||||||
`mv "${path.basename(destinationFolder)}/*" "${path.resolve(`..`, `${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 !== ``) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue