File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -342,7 +342,13 @@ def cli_prepare(
342
342
engine .conan_options = list (conan_option )
343
343
engine .conan_settings = list (conan_setting )
344
344
345
- engine .prepare ()
345
+ try :
346
+ engine .prepare ()
347
+ except ChildProcessError :
348
+ # Most likely scenario:
349
+ # 1. conan had an error and terminated with non-zero error
350
+ # 2. error has already been logged
351
+ sys .exit (1 )
346
352
347
353
348
354
# _________________________________________________________________________
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ def run_cmd(
25
25
)
26
26
if result .returncode != 0 :
27
27
logging .error (f"Error running: { ' ' .join (cmd )} " )
28
- logging .error (result .stdout )
28
+ if result .stdout is not None :
29
+ logging .error (result .stdout )
29
30
if must_succeed :
30
31
raise ChildProcessError ()
31
32
return result
You can’t perform that action at this time.
0 commit comments