diff --git a/packages/cli/src/commands/run.ts b/packages/cli/src/commands/run.ts index 5aa24c01e0..0f307c7aa5 100644 --- a/packages/cli/src/commands/run.ts +++ b/packages/cli/src/commands/run.ts @@ -61,8 +61,11 @@ export const run: Command = { }, }; -function loadValidationScript(cueFilepath: string): string { - cueFilepath = path.resolve(cueFilepath); +function loadValidationScript( + manifestPath: string, + cueFilepath: string +): string { + cueFilepath = path.join(path.dirname(manifestPath), cueFilepath); if (!fs.existsSync(cueFilepath)) { console.error( @@ -83,7 +86,7 @@ const _run = async (options: WorkflowCommandOptions) => { const manifestPath = path.resolve(manifest); const workflow = loadWorkflowManifest(manifestPath); const validationScript = workflow.validation - ? loadValidationScript(workflow.validation) + ? loadValidationScript(manifestPath, workflow.validation) : undefined; const workflowOutput: (JobResult & { id: string })[] = []; diff --git a/packages/templates/wasm/assemblyscript/polywrap.test.yaml b/packages/templates/wasm/assemblyscript/polywrap.test.yaml index f03c0a880a..c8082ba5cc 100644 --- a/packages/templates/wasm/assemblyscript/polywrap.test.yaml +++ b/packages/templates/wasm/assemblyscript/polywrap.test.yaml @@ -1,6 +1,6 @@ name: template-wasm-rs format: 0.1 -validation: "./workflows/validation.cue" +validation: "./workflows/validator.cue" jobs: sampleMethod: steps: