Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 10 additions & 21 deletions src/acp/transports.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,16 @@ async def spawn_stdio_transport(
if env:
merged_env.update(env)

if limit is None:
process = await asyncio.create_subprocess_exec(
command,
*args,
stdin=aio_subprocess.PIPE,
stdout=aio_subprocess.PIPE,
stderr=stderr,
env=merged_env,
cwd=str(cwd) if cwd is not None else None,
)
else:
process = await asyncio.create_subprocess_exec(
command,
*args,
stdin=aio_subprocess.PIPE,
stdout=aio_subprocess.PIPE,
stderr=stderr,
env=merged_env,
cwd=str(cwd) if cwd is not None else None,
limit=limit,
)
process = await asyncio.create_subprocess_exec(
command,
*args,
stdin=aio_subprocess.PIPE,
stdout=aio_subprocess.PIPE,
stderr=stderr,
env=merged_env,
cwd=str(cwd) if cwd is not None else None,
limit=limit,
)

if process.stdout is None or process.stdin is None:
process.kill()
Expand Down
Loading