(body: string, env: NodeJS.ProcessEnv = {})
| 69 | // The preflight blocks run before `body`, so the persistence dirs default to a |
| 70 | // writable scratch path that lets those blocks pass. |
| 71 | function runScript(body: string, env: NodeJS.ProcessEnv = {}) { |
| 72 | const writable = path.join(scratch, "ok"); |
| 73 | return spawnSync("bash", ["-c", `${HARNESS}\n${body}\n`], { |
| 74 | encoding: "utf-8", |
| 75 | env: { |
| 76 | ...process.env, |
| 77 | HOME: path.join(scratch, "home"), |
| 78 | XDG_CONFIG_HOME: path.join(scratch, "config"), |
| 79 | OPENHANDS_DIR: writable, |
| 80 | OH_PERSISTENCE_DIR: writable, |
| 81 | OH_CONVERSATIONS_PATH: writable, |
| 82 | OH_BASH_EVENTS_DIR: writable, |
| 83 | LOCAL_STORAGE_PATH: writable, |
| 84 | AUTOMATION_WORKSPACE_BASE: writable, |
| 85 | ...env, |
| 86 | }, |
| 87 | }); |
| 88 | } |
| 89 | |
| 90 | // Drive the reporter directly with the error strings the kernel actually emits. |
| 91 | function runReport(osError: string) { |
no outgoing calls
no test coverage detected