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)
|
self.error(error)
|
||||||
|
|
||||||
def warning(self, message: str) -> None:
|
def warning(self, message: str) -> None:
|
||||||
print()
|
|
||||||
|
|
||||||
if self.fold_mode == 'github':
|
if self.fold_mode == 'github':
|
||||||
print(f'::warning::{message}')
|
print(f'::warning::{message}\n', file=sys.stderr)
|
||||||
else:
|
else:
|
||||||
c = self.colors
|
c = self.colors
|
||||||
print(f'{c.yellow}Warning{c.end} {message}')
|
print(f'{c.yellow}Warning{c.end}: {message}\n', file=sys.stderr)
|
||||||
|
|
||||||
print()
|
|
||||||
|
|
||||||
def error(self, error: Union[BaseException, str]) -> None:
|
def error(self, error: Union[BaseException, str]) -> None:
|
||||||
print()
|
|
||||||
|
|
||||||
if self.fold_mode == 'github':
|
if self.fold_mode == 'github':
|
||||||
print(f'::error::{error}')
|
print(f'::error::{error}\n', file=sys.stderr)
|
||||||
else:
|
else:
|
||||||
c = self.colors
|
c = self.colors
|
||||||
print(f'{c.bright_red}Error{c.end} {error}')
|
print(f'{c.bright_red}Error{c.end}: {error}\n', file=sys.stderr)
|
||||||
|
|
||||||
print()
|
|
||||||
|
|
||||||
def _start_fold_group(self, name: str) -> None:
|
def _start_fold_group(self, name: str) -> None:
|
||||||
self._end_fold_group()
|
self._end_fold_group()
|
||||||
|
|||||||
+1
-4
@@ -37,10 +37,7 @@ def cibuildwheel_get_build_identifiers(project_path, env=None):
|
|||||||
env=env,
|
env=env,
|
||||||
)
|
)
|
||||||
|
|
||||||
lines = cmd_output.strip().split('\n')
|
return cmd_output.strip().split('\n')
|
||||||
|
|
||||||
# ignore warning lines in output
|
|
||||||
return [l for l in lines if l != '' and not l.startswith('Warning ')]
|
|
||||||
|
|
||||||
|
|
||||||
def cibuildwheel_run(project_path, package_dir='.', env=None, add_env=None, output_dir=None):
|
def cibuildwheel_run(project_path, package_dir='.', env=None, add_env=None, output_dir=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user