mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 10:05:18 +00:00
Fix test helper TS compatibility
This commit is contained in:
parent
153480256a
commit
f88f2793c0
1 changed files with 2 additions and 1 deletions
|
|
@ -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}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue