@@ -102,20 +102,22 @@ def _run_command_with_confirmation(
102102
103103 def _run_command (self , cmd : list [str ], cwd : Path | None = None ) -> bool :
104104 """Run a command and return True if successful."""
105+ self ._print_header (f"Running: { ' ' .join (cmd )} " )
106+ separator = 3 * ("=" * self ._get_terminal_width () + "\n " )
107+ print (separator )
108+
105109 try :
106- self ._print_header (f"Running: { ' ' .join (cmd )} " )
107- separator = 3 * ("=" * self ._get_terminal_width () + "\n " )
108- print (separator )
109110 result = subprocess .run (cmd , cwd = cwd or self .project_root , check = True )
110- print (separator )
111- return result .returncode == 0
112111 except subprocess .CalledProcessError as e :
113112 self ._print_error (f"Command failed with exit code { e .returncode } " )
114113 return False
115114 except FileNotFoundError :
116115 self ._print_error (f"Command not found: { cmd [0 ]} " )
117116 return False
118117
118+ print (separator )
119+ return result .returncode == 0
120+
119121 def _show_summary (self , items : list [Path ], title : str ) -> None :
120122 """Show a formatted summary of items."""
121123 if not items :
@@ -856,13 +858,14 @@ def _check_tool_available(self, tool_name: str, check_cmd: list[str]) -> bool:
856858 result = subprocess .run (
857859 check_cmd , capture_output = True , text = True , check = True
858860 )
859- self ._print_success (f"{ tool_name } version: { result .stdout .strip ()} " )
860- return True
861861 except (subprocess .CalledProcessError , FileNotFoundError ):
862862 self ._print_error (f"{ tool_name } not found!" )
863863 self ._print_warning (f"Please install { tool_name } to use this feature" )
864864 return False
865865
866+ self ._print_success (f"{ tool_name } version: { result .stdout .strip ()} " )
867+ return True
868+
866869 def _handle_pytest_results_cleanup (self ) -> None :
867870 """Handle cleanup of pytest_results directory."""
868871 pytest_results = self .project_root / "pytest_results"
0 commit comments