We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d4dcee commit efaf3bfCopy full SHA for efaf3bf
1 file changed
experiments/bb-exp.py
@@ -6,7 +6,7 @@
6
import os
7
import stat
8
import pathlib
9
-# import shutil
+import shutil
10
11
# recall sys.argv[0] is the script name
12
if len(sys.argv) < 4 or len(sys.argv) > 5 :
@@ -43,7 +43,10 @@
43
# 1 hour
44
MAX_TIME_SECONDS = 3600
45
46
-TIMEOUT_COMMAND = "timeout 90m "
+TIMEOUT_BIN = shutil.which("timeout") or shutil.which("gtimeout")
47
+if TIMEOUT_BIN is None:
48
+ raise Exception("Neither 'timeout' nor 'gtimeout' command found. On macOS, please run: 'brew install coreutils'")
49
+TIMEOUT_COMMAND = f"{TIMEOUT_BIN} 90m "
50
51
if not os.path.isdir(BASE_DIR):
52
print("creating folder: " + BASE_DIR)
0 commit comments