Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/cli/src/commands/results/eval-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ export function registerEvalRoutes(
cwd,
stdio: ['ignore', 'pipe', 'pipe'],
env: { ...process.env },
// Windows requires shell:true to execute .cmd/.bat wrappers (e.g. npm-installed agentv.cmd)
shell: process.platform === 'win32',
});

run.process = child;
Expand Down Expand Up @@ -440,6 +442,7 @@ export function registerEvalRoutes(
cwd,
stdio: ['ignore', 'pipe', 'pipe'],
env: { ...process.env },
shell: process.platform === 'win32',
});

run.process = child;
Expand Down
3 changes: 2 additions & 1 deletion packages/core/test/evaluation/content-preprocessor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ describe('content preprocessors', () => {
await writeFile(
scriptPath,
`const fs = require('node:fs');
const path = require('node:path');
const payload = JSON.parse(fs.readFileSync(0, 'utf8'));
console.log('sheet:' + payload.original_path.split('/').pop());`,
console.log('sheet:' + path.basename(payload.original_path));`,
'utf8',
);

Expand Down
3 changes: 2 additions & 1 deletion packages/core/test/evaluation/llm-grader-multimodal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,9 @@ describe('LlmGraderEvaluator multimodal', () => {
await writeFile(
scriptPath,
`const fs = require('node:fs');
const path = require('node:path');
const payload = JSON.parse(fs.readFileSync(0, 'utf8'));
console.log('spreadsheet:' + payload.original_path.split('/').pop());`,
console.log('spreadsheet:' + path.basename(payload.original_path));`,
'utf8',
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,7 @@ assertions:
[tempDir],
'test-5',
),
).rejects.toThrow(/\.agentv\/templates\/missing-template\.yaml/);
).rejects.toThrow(/\.agentv[/\\]templates[/\\]missing-template\.yaml/);
});
});

Expand Down
Loading