File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 6
6
import textwrap
7
7
import warnings
8
8
from typing import Callable
9
+ from typing import Final
9
10
from typing import Mapping
10
11
from typing import overload
11
12
from typing import Sequence
20
21
else :
21
22
BaseCompletedProcess = subprocess .CompletedProcess
22
23
24
+ # pick 40 seconds
25
+ # unfortunately github CI for windows sometimes needs
26
+ # up to 30 seconds to start a command
27
+
28
+ BROKEN_TIMEOUT : Final [int ] = 40
23
29
24
30
log = _log .log .getChild ("run_cmd" )
25
31
@@ -126,7 +132,7 @@ def run(
126
132
* ,
127
133
strip : bool = True ,
128
134
trace : bool = True ,
129
- timeout : int = 20 ,
135
+ timeout : int = BROKEN_TIMEOUT ,
130
136
check : bool = False ,
131
137
) -> CompletedProcess :
132
138
if isinstance (cmd , str ):
@@ -174,7 +180,7 @@ def has_command(
174
180
name : str , args : Sequence [str ] = ["version" ], warn : bool = True
175
181
) -> bool :
176
182
try :
177
- p = run ([name , * args ], cwd = "." , timeout = 5 )
183
+ p = run ([name , * args ], cwd = "." , timeout = BROKEN_TIMEOUT )
178
184
if p .returncode != 0 :
179
185
log .error (f"Command '{ name } ' returned non-zero. This is stderr:" )
180
186
log .error (p .stderr )
You can’t perform that action at this time.
0 commit comments