diff --git a/cibuildwheel/logger.py b/cibuildwheel/logger.py index ee98feec..60e1b3c2 100644 --- a/cibuildwheel/logger.py +++ b/cibuildwheel/logger.py @@ -116,26 +116,18 @@ class Logger: self.error(error) def warning(self, message: str) -> None: - print() - if self.fold_mode == 'github': - print(f'::warning::{message}') + print(f'::warning::{message}\n', file=sys.stderr) else: c = self.colors - print(f'{c.yellow}Warning{c.end} {message}') - - print() + print(f'{c.yellow}Warning{c.end}: {message}\n', file=sys.stderr) def error(self, error: Union[BaseException, str]) -> None: - print() - if self.fold_mode == 'github': - print(f'::error::{error}') + print(f'::error::{error}\n', file=sys.stderr) else: c = self.colors - print(f'{c.bright_red}Error{c.end} {error}') - - print() + print(f'{c.bright_red}Error{c.end}: {error}\n', file=sys.stderr) def _start_fold_group(self, name: str) -> None: self._end_fold_group() diff --git a/test/utils.py b/test/utils.py index e9b48e19..1539e5ca 100644 --- a/test/utils.py +++ b/test/utils.py @@ -37,10 +37,7 @@ def cibuildwheel_get_build_identifiers(project_path, env=None): env=env, ) - lines = cmd_output.strip().split('\n') - - # ignore warning lines in output - return [l for l in lines if l != '' and not l.startswith('Warning ')] + return cmd_output.strip().split('\n') def cibuildwheel_run(project_path, package_dir='.', env=None, add_env=None, output_dir=None):