diff --git a/modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy b/modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy index 73cbc9de79..f72d5124f1 100644 --- a/modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy @@ -1139,7 +1139,7 @@ class TaskProcessor { final action = task.config.getErrorStrategy() // retry is not allowed when the script cannot be compiled or similar errors - if( error instanceof ProcessUnrecoverableException ) { + if( error instanceof ProcessUnrecoverableException || error.cause instanceof ProcessUnrecoverableException ) { return !action.soft ? action : TERMINATE }