diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index 4118fd79..19f36064 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -251,7 +251,7 @@ def build(options: BuildOptions) -> None: docker.copy_out(container_output_dir, options.output_dir) log.step_end() except subprocess.CalledProcessError as error: - log.error(f'Command {error.cmd} failed with code {error.returncode}. {error.stdout}') + log.step_end_with_error(f'Command {error.cmd} failed with code {error.returncode}. {error.stdout}') troubleshoot(options.package_dir, error) exit(1) diff --git a/cibuildwheel/logger.py b/cibuildwheel/logger.py index bfb81b3a..4724b605 100644 --- a/cibuildwheel/logger.py +++ b/cibuildwheel/logger.py @@ -111,7 +111,7 @@ class Logger: self.step_start_time = None - def error(self, error: Union[BaseException, str]) -> None: + def step_end_with_error(self, error: Union[BaseException, str]) -> None: self.step_end(success=False) print() diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index f53b0acd..d43d2954 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -359,5 +359,5 @@ def build(options: BuildOptions) -> None: shutil.move(str(repaired_wheel), options.output_dir) log.build_end() except subprocess.CalledProcessError as error: - log.error(f'Command {error.cmd} failed with code {error.returncode}. {error.stdout}') + log.step_end_with_error(f'Command {error.cmd} failed with code {error.returncode}. {error.stdout}') exit(1) diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index 3e977e4b..a156db3a 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -330,5 +330,5 @@ def build(options: BuildOptions) -> None: shutil.move(str(repaired_wheel), options.output_dir) log.build_end() except subprocess.CalledProcessError as error: - log.error(f'Command {error.cmd} failed with code {error.returncode}. {error.stdout}') + log.step_end_with_error(f'Command {error.cmd} failed with code {error.returncode}. {error.stdout}') exit(1)