Skip to content

Commit 71a4268

Browse files
committed
catch traceback if nextflow config command fails
1 parent 58bb622 commit 71a4268

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

nf_core/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,12 @@ def fetch_wf_config(wf_path: Path, cache_config: bool = True) -> dict:
553553
log.debug("No config cache found")
554554

555555
# Call `nextflow config`
556-
result = run_cmd("nextflow", f"config -o json {wf_path}")
556+
try:
557+
result = run_cmd("nextflow", f"config -o json {wf_path}")
558+
except RuntimeError as e:
559+
raise UserWarning(
560+
f"Could not parse Nextflow config for '{wf_path}'. Possibly because of a Nextflow version mismatch?\n{e}"
561+
) from e
557562
if result is not None:
558563
nfconfig_raw, _ = result
559564
try:

0 commit comments

Comments
 (0)