exit on failure, add per-class logging
All checks were successful
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (pull_request) Successful in 3m26s
Check flake.lock / Check health of `flake.lock` (pull_request) Successful in 20s
Check Nix flake / Build nix outputs (ubuntu-latest) (pull_request) Successful in 2m21s
Check Nix formatting / Perform Nix format checks (pull_request) Successful in 1m41s
All checks were successful
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (pull_request) Successful in 3m26s
Check flake.lock / Check health of `flake.lock` (pull_request) Successful in 20s
Check Nix flake / Build nix outputs (ubuntu-latest) (pull_request) Successful in 2m21s
Check Nix formatting / Perform Nix format checks (pull_request) Successful in 1m41s
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
@ -5,6 +5,8 @@ import shutil
|
||||
|
||||
from flupdt.common import bash_wrapper
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def compare_derivations(
|
||||
path_to_flake: str, path_to_pre_drv: str, path_to_post_drv: str, *, soft_failure: bool = True
|
||||
@ -24,10 +26,10 @@ def compare_derivations(
|
||||
)
|
||||
|
||||
if returncode != 0:
|
||||
log_func = logging.error
|
||||
log_func = logger.error
|
||||
if soft_failure:
|
||||
log_func = logging.warning
|
||||
logging.warning(f"diff failed for {path_to_pre_drv} and {path_to_post_drv}")
|
||||
log_func = logger.warning
|
||||
logger.warning(f"diff failed for {path_to_pre_drv} and {path_to_post_drv}")
|
||||
log_func(stderr)
|
||||
|
||||
return stdout
|
||||
|
Reference in New Issue
Block a user