Skip to content

Commit 2e87677

Browse files
committed
fix: bad use of subprocess
1 parent 06541aa commit 2e87677

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

scw_serverless/gateway/serverless_gateway.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ def __init__(self) -> None:
2828

2929
def _invoke_cli(self, args: list[str]) -> subprocess.CompletedProcess:
3030
cmd = subprocess.run(
31-
executable=self.cli,
32-
args=args,
31+
args=[self.cli] + args,
3332
check=True,
3433
stdout=subprocess.PIPE,
3534
universal_newlines=True,

tests/integrations/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ def get_deployed_functions_by_name(client: Client, app_instance: Serverless):
6262

6363
def get_gateway_endpoint() -> str:
6464
cmd = subprocess.run(
65-
executable="scwgw", args=["get-endpoint"], check=True, capture_output=True
65+
args=["scwgw", "get-endpoint"],
66+
check=True,
67+
capture_output=True,
6668
)
6769
return cmd.stdout.decode().strip()
6870

0 commit comments

Comments
 (0)