Fix test helper TS compatibility

This commit is contained in:
Nathan Flurry 2026-03-08 13:50:24 -07:00
parent 153480256a
commit f88f2793c0

View file

@ -154,7 +154,8 @@ export async function startDockerSandboxAgent(
encoding: "utf8",
stdio: ["ignore", "pipe", "pipe"],
}).trim();
const hostPort = mapping.split(":").at(-1)?.trim();
const mappingParts = mapping.split(":");
const hostPort = mappingParts[mappingParts.length - 1]?.trim();
if (!hostPort) {
throw new Error(`missing mapped host port in ${mapping}`);
}