Skip to content

Commit 74bcf80

Browse files
committed
Disable debug mode
1 parent cf47d76 commit 74bcf80

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

evals/apps/cli/src/index.ts

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ const runExercise = async ({ run, task, server }: { run: Run; task: Task; server
172172
// Use --wait --log trace or --verbose.
173173
const codeCommand = `code --disable-workspace-trust`
174174

175-
const subprocess = execa({
175+
await execa({
176176
env: {
177177
ROO_CODE_IPC_SOCKET_PATH: taskSocketPath,
178178
},
@@ -181,11 +181,12 @@ const runExercise = async ({ run, task, server }: { run: Run; task: Task; server
181181
})`${codeCommand} -n ${path.resolve(exercisesPath, language, exercise)}`
182182

183183
// If debugging:
184+
// Don't await execa and store result as subprocess.
184185
// subprocess.stdout.pipe(process.stdout)
185186

186187
// Give VSCode some time to spawn before connectint to its unix socket.
187188
await new Promise((resolve) => setTimeout(resolve, 1_000))
188-
console.log(`Connecting to ${taskSocketPath} (pid: ${subprocess.pid})`)
189+
console.log(`Connecting to ${taskSocketPath}`)
189190

190191
const createClient = (taskSocketPath: string) => {
191192
const ipcClient = new IpcClient(taskSocketPath)
@@ -355,14 +356,12 @@ const runExercise = async ({ run, task, server }: { run: Run; task: Task; server
355356
}
356357
}
357358

358-
try {
359-
console.log(`[cli#runExercise | ${language} / ${exercise}] aborting subprocess`)
360-
controller.abort()
361-
await subprocess
362-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
363-
} catch (error) {
364-
// console.error(error)
365-
}
359+
// try {
360+
// console.log(`[cli#runExercise | ${language} / ${exercise}] aborting subprocess`)
361+
// controller.abort()
362+
// await subprocess
363+
// } catch (error) {
364+
// }
366365
}
367366

368367
const runUnitTest = async ({ task }: { task: Task }) => {
@@ -374,15 +373,15 @@ const runUnitTest = async ({ task }: { task: Task }) => {
374373
let passed = true
375374

376375
for (const command of commands) {
377-
const controller = new AbortController()
378-
const cancelSignal = controller.signal
379-
const timeout = setTimeout(() => controller.abort(), cmd.timeout ?? 15_000)
376+
// const controller = new AbortController()
377+
// const cancelSignal = controller.signal
378+
// const timeout = setTimeout(() => controller.abort(), cmd.timeout ?? 15_000)
380379

381380
try {
382-
const result = await execa({ cwd, shell: true, reject: false, cancelSignal })`${command}`
381+
const result = await execa({ cwd, shell: true, reject: false /* , cancelSignal */ })`${command}`
383382
// console.log('[cli#run] execa result =', { ...result, cwd, command })
384383

385-
clearTimeout(timeout)
384+
// clearTimeout(timeout)
386385

387386
if (result.failed) {
388387
passed = false

0 commit comments

Comments
 (0)