Skip to content

Commit 8244f78

Browse files
committed
fix: allow non-default ports to be sent to the server binary on Linux
1 parent d360a0b commit 8244f78

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rlbot/utils/gateway.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from rlbot.interface import RLBOT_SERVER_PORT
1111
from rlbot.utils.logging import DEFAULT_LOGGER
12+
from rlbot.utils.os_detector import CURRENT_OS
1213

1314

1415
def find_main_executable_path(
@@ -72,7 +73,11 @@ def launch(
7273
)
7374

7475
port = find_open_server_port()
75-
args = [str(path), str(port)]
76+
77+
if CURRENT_OS == "Windows":
78+
args = [str(path), str(port)]
79+
else:
80+
args = f"{path} {port}" # on Unix, when shell=True, args must be a string for flags to reach the executable
7681
DEFAULT_LOGGER.info("Launching RLBotServer with via %s", args)
7782

7883
return subprocess.Popen(args, shell=True, cwd=directory), port

0 commit comments

Comments
 (0)