Skip to content

Commit 399648d

Browse files
committed
Allow -with-docker to be used without a default container image
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
1 parent 7fa1109 commit 399648d

1 file changed

Lines changed: 0 additions & 26 deletions

File tree

modules/nextflow/src/main/groovy/nextflow/config/ConfigBuilder.groovy

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -802,32 +802,6 @@ class ConfigBuilder {
802802
else if( containerConfig.image ) {
803803
config.process.container = containerConfig.image
804804
}
805-
806-
if( !hasContainerDirective(config.process) )
807-
throw new AbortOperationException("You have requested to run with ${engine.capitalize()} but no image was specified")
808-
809-
}
810-
811-
/**
812-
* Verify that configuration for process contains at last one `container` directive
813-
*
814-
* @param process
815-
* @return {@code true} when a `container` is defined or {@code false} otherwise
816-
*/
817-
protected boolean hasContainerDirective(process) {
818-
819-
if( process instanceof Map ) {
820-
if( process.container )
821-
return true
822-
823-
def result = process
824-
.findAll { String name, value -> (name.startsWith('withName:') || name.startsWith('$')) && value instanceof Map }
825-
.find { String name, Map value -> value.container as boolean } // the first non-empty `container` string
826-
827-
return result as boolean
828-
}
829-
830-
return false
831805
}
832806

833807
ConfigObject buildConfigObject() {

0 commit comments

Comments
 (0)