diff --git a/src/rail/cli/scripts.py b/src/rail/cli/scripts.py index fa62cff7..41c536a4 100644 --- a/src/rail/cli/scripts.py +++ b/src/rail/cli/scripts.py @@ -39,13 +39,14 @@ def render_nb(outdir, clear_output, dry_run, inputs, **kwargs): render = os.system(comline) status[nb_file] = render - ret_val = 0 + failed_notebooks = [] for key, val in status.items(): print(f"{key} {val}") if val != 0: - ret_val = val + failed_notebooks.append(key) - return ret_val + if failed_notebooks: + raise ValueError(f"The following notebooks failed {str(failed_notebooks)}") def clone_source(outdir, git_mode, dry_run, package_file):