From 4c6af67eda776e14bdf50bd8486e0d81a4be04a9 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Thu, 25 Sep 2025 22:19:21 +0200 Subject: [PATCH] feat: use provided run function instead of the one asserted --- src/services/run.services.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/services/run.services.ts b/src/services/run.services.ts index 76972a4b..7bd45659 100644 --- a/src/services/run.services.ts +++ b/src/services/run.services.ts @@ -35,20 +35,16 @@ export const run = async (args?: string[]) => { }) : onRun; - const assertJob = OnRunSchema.safeParse(job); - - if (!assertJob.success) { + if (!OnRunSchema.safeParse(job).success) { console.log(red('Your job to run is invalid. It must be of type OnRun.')); return; } - const {data: assertedJob} = assertJob; - const { satellite: {satelliteId, identity} } = await assertConfigAndLoadSatelliteContext(); - await assertedJob.run({ + await job.run({ satelliteId: Principal.fromText(satelliteId), identity, ...(nonNullish(ENV.containerUrl) && {container: ENV.containerUrl})