mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-16 23:02:04 +00:00
Fix test helper TS compatibility
This commit is contained in:
parent
57a3106209
commit
845f71c966
1 changed files with 2 additions and 1 deletions
|
|
@ -154,7 +154,8 @@ export async function startDockerSandboxAgent(
|
||||||
encoding: "utf8",
|
encoding: "utf8",
|
||||||
stdio: ["ignore", "pipe", "pipe"],
|
stdio: ["ignore", "pipe", "pipe"],
|
||||||
}).trim();
|
}).trim();
|
||||||
const hostPort = mapping.split(":").at(-1)?.trim();
|
const mappingParts = mapping.split(":");
|
||||||
|
const hostPort = mappingParts[mappingParts.length - 1]?.trim();
|
||||||
if (!hostPort) {
|
if (!hostPort) {
|
||||||
throw new Error(`missing mapped host port in ${mapping}`);
|
throw new Error(`missing mapped host port in ${mapping}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue