Route warnings and error messages to stderr, not stdout.
This commit is contained in:
+4
-12
@@ -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()
|
||||
|
||||
+1
-4
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user