Skip to content

Commit

Permalink
log failed files to status
Browse files Browse the repository at this point in the history
  • Loading branch information
nleanba committed Sep 27, 2024
1 parent 852a6dd commit c38bc59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export {
GHActServer,
GHActWorker,
type Job,
} from "https://deno.land/x/[email protected].3/mod.ts";
} from "https://deno.land/x/[email protected].6/mod.ts";
7 changes: 5 additions & 2 deletions src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const UPDATE = (fileName: string) => `${DROP(fileName)}; ${LOAD(fileName)}`;
const _worker = new GHActWorker(
self,
ghActConfig,
async (job: Job, log): Promise<void> => {
async (job: Job, log): Promise<string> => {
log(
"Starting transformation\n" + JSON.stringify(job, undefined, 2),
);
Expand Down Expand Up @@ -99,9 +99,12 @@ const _worker = new GHActWorker(
log(`All failed:\n ${failingFiles.join("\n ")}`);
throw new Error(`All failed`);
} else if (failingFiles.length > 0) {
log(`Some failed:\n ${failingFiles.join("\n ")}`);
const message = `Some failed:\n ${failingFiles.join("\n ")}`;
log(message);
return message;
} else {
log("All succeeded");
return "";
}
},
);

0 comments on commit c38bc59

Please sign in to comment.