diff --git a/src/anycastd/prefix/frrouting.py b/src/anycastd/prefix/frrouting.py index 5544e96..e471f50 100644 --- a/src/anycastd/prefix/frrouting.py +++ b/src/anycastd/prefix/frrouting.py @@ -89,8 +89,9 @@ async def _run_vtysh_commands(self, commands: tuple[str, ...]) -> str: Raises: RuntimeError: The command exited with a non-zero exit code. """ + vty_cmd = "\n".join(commands) proc = await asyncio.create_subprocess_exec( - self.vtysh, "-c", *commands, stdout=subprocess.PIPE, stderr=subprocess.PIPE + self.vtysh, "-c", vty_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE ) stdout, stderr = await proc.communicate()