Permalink
Browse files

fix exc if dbl inp ext overlaps output with sng ext

  • Loading branch information...
ssadedin committed Dec 16, 2017
1 parent 732ae0a commit a243d48acbb0457d83e97fb9d189582babfa89e9
@@ -155,8 +155,10 @@ class PipelineInput {
*/
def propertyMissing(String name) {
log.info "Searching for missing Property: $name"
def resolved
List<String> resolved
InputMissingError ime
try {
if(name =="dir") {
log.info "Trying to resolve input as directory ...."
resolved = resolveInputAsDirectory()
@@ -170,27 +172,31 @@ class PipelineInput {
throw new PipelineError("Insufficient inputs: at least ${defaultValueIndex+1} inputs are expected with extension .${name} but only ${resolved.size()} are available")
}
parentError=null
resolved = [mapToCommandValue(resolved)]
}
catch(InputMissingError e) {
PipelineInput childInp = new PipelineInput(this.resolvedInputs.clone(), stages, aliases)
childInp.parent = this
childInp.resolvedInputs = this.resolvedInputs
childInp.currentFilter = this.currentFilter
childInp.extensionPrefix = this.extensionPrefix ? this.extensionPrefix+"."+name : name
childInp.defaultValueIndex = defaultValueIndex
childInp.parentError = e
log.info("No input resolved for property $name: returning child PipelineInput for possible double extension resolution")
return childInp;
resolved = this.resolvedInputs
ime = e
}
return mapToCommandValue(resolved)
PipelineInput childInp = new PipelineInput(resolved.clone(), stages, aliases)
childInp.parent = this
childInp.resolvedInputs = resolved.clone()
childInp.currentFilter = this.currentFilter
childInp.extensionPrefix = this.extensionPrefix ? this.extensionPrefix+"."+name : name
childInp.defaultValueIndex = defaultValueIndex
childInp.parentError = ime
return childInp;
}
String resolveInputAsDirectory() {
List<String> resolveInputAsDirectory() {
List outputStack = this.computeOutputStack()
for(List outputs in outputStack) {
def result = Utils.box(outputs).find { new File(it).isDirectory() }
if(result)
return result
return [result]
}
}
@@ -0,0 +1 @@
rm -f test.cov.tsv test.cov.world.cov test.cov.world.there.txt
@@ -0,0 +1,7 @@
source ../testsupport.sh
run
exists test.cov.world.there.txt || err "Expected output test.cov.world.there.txt not found"
true
@@ -0,0 +1,25 @@
hello = {
produce('test.cov.tsv') {
exec """
touch $output.tsv
"""
}
}
world = {
exec """
touch $output.cov
"""
}
there = {
exec """
cp $input.cov.tsv $output.txt
"""
}
run {
hello + world + there
}

0 comments on commit a243d48

Please sign in to comment.