skip cache push where contents is 0

pull/461/head
Frostebite 2022-09-18 06:54:56 +01:00
parent 40078f987c
commit 76667f4eb5
3 changed files with 5 additions and 1 deletions

1
dist/index.js vendored
View File

@ -3862,6 +3862,7 @@ class Caching {
const contents = yield fs_1.default.promises.readdir(path_1.default.basename(sourceFolder));
cloud_runner_logger_1.default.log(`There is ${contents.length} files/dir in the source folder ${path_1.default.basename(sourceFolder)}`);
if (contents.length === 0) {
cloud_runner_logger_1.default.log(`Did not push source folder to cache because it was empty ${path_1.default.basename(sourceFolder)}`);
process.chdir(`${startPath}`);
return;
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -65,6 +65,9 @@ export class Caching {
);
if (contents.length === 0) {
CloudRunnerLogger.log(
`Did not push source folder to cache because it was empty ${path.basename(sourceFolder)}`,
);
process.chdir(`${startPath}`);
return;