@@ -335,7 +335,7 @@ def _prepare_virtualenv(self, with_json: bool = False) -> None:
335
335
for arg in self .conan_args :
336
336
conan_cmd .append (arg )
337
337
conan_cmd .append (self .profile_path )
338
- result = subprocess .run (conan_cmd , check = False , capture_output = True )
338
+ result = subprocess .run (conan_cmd , check = False , capture_output = self . capture_output )
339
339
if result .returncode == 0 :
340
340
# Short-circuit out if everything is fine.
341
341
return
@@ -349,7 +349,15 @@ def _prepare_virtualenv(self, with_json: bool = False) -> None:
349
349
stderr_lines = result .stderr .decode ().splitlines ()
350
350
for line in stderr_lines :
351
351
logging .error (
352
- "\n " .join (textwrap .wrap (line , 80 , initial_indent = " " , subsequent_indent = " " , break_long_words = False ))
352
+ "\n " .join (
353
+ textwrap .wrap (
354
+ line ,
355
+ 80 ,
356
+ initial_indent = " " ,
357
+ subsequent_indent = " " ,
358
+ break_long_words = False ,
359
+ )
360
+ )
353
361
)
354
362
355
363
# Here are some errors that can happen and what to do about them.
@@ -393,15 +401,14 @@ def _prepare_virtualenv(self, with_json: bool = False) -> None:
393
401
],
394
402
}
395
403
for error in stderr_lines :
396
- for ( regex , response ) in known_errors .items ():
404
+ for regex , response in known_errors .items ():
397
405
if re .match (regex , error ):
398
406
logging .error ("" )
399
407
logging .error ("Note:" )
400
408
for line in response :
401
409
logging .error (f" { line } " )
402
410
sys .exit (2 )
403
411
404
-
405
412
def _extract_engine_path (self , env : Environment ) -> Path :
406
413
"""Return the first cloe-engine we find in the PATH."""
407
414
for bindir in env .get_list ("PATH" , default = []):
@@ -548,6 +555,8 @@ def shell(
548
555
for plugin in plugin_setups :
549
556
logging .warning (f" { plugin .plugin } " )
550
557
558
+ # TODO: Use preserve_env from plugin_setups!
559
+
551
560
# Replace this process with the SHELL now.
552
561
sys .stdout .flush ()
553
562
cmd = [shell ]
0 commit comments