Skip to content

Commit 922793c

Browse files
committed
10 minutes timeout for unity installation
1 parent 219d590 commit 922793c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/gha/unity_installer.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
from print_matrix_configuration import UNITY_SETTINGS
8484

8585

86-
FLAGS = flags.FLAGS
86+
_CMD_TIMEOUT = 600
8787

8888
_DEFALUT = "Default"
8989
_ANDROID = "Android"
@@ -93,6 +93,8 @@
9393
_LINUX = "Linux"
9494
_SUPPORTED_PLATFORMS = (_ANDROID, _IOS, _WINDOWS, _MACOS, _LINUX)
9595

96+
FLAGS = flags.FLAGS
97+
9698
# These are the three actions supported by the tool.
9799
flags.DEFINE_bool(
98100
"install", False,
@@ -258,9 +260,10 @@ def get_unity_path(version):
258260
raise RuntimeError("Only Windows and MacOS are supported.")
259261

260262

261-
def run(args, check=True):
263+
def run(args, check=True, timeout=_CMD_TIMEOUT):
262264
"""Runs args in a subprocess, throwing an error on non-zero return code."""
263-
subprocess.run(args=args, check=check)
265+
logging.info("run cmd: %s", " ".join(args))
266+
subprocess.run(args=args, check=check, timeout=timeout)
264267

265268

266269
if __name__ == "__main__":

0 commit comments

Comments
 (0)