diff --git a/plugins/nf-ga4gh/src/main/nextflow/ga4gh/tes/executor/TesFileCopyStrategy.groovy b/plugins/nf-ga4gh/src/main/nextflow/ga4gh/tes/executor/TesFileCopyStrategy.groovy index 9b8362705d..7729b1cd68 100644 --- a/plugins/nf-ga4gh/src/main/nextflow/ga4gh/tes/executor/TesFileCopyStrategy.groovy +++ b/plugins/nf-ga4gh/src/main/nextflow/ga4gh/tes/executor/TesFileCopyStrategy.groovy @@ -113,6 +113,7 @@ class TesFileCopyStrategy implements ScriptFileCopyStrategy { copy.remove('PATH') // when a remote bin directory is provide managed it properly if( remoteBinDir ) { + result << "mkdir \$PWD/nextflow-bin/\n" result << "cp -r ${remoteBinDir}/* \$PWD/nextflow-bin/\n" result << "chmod +x \$PWD/nextflow-bin/* || true\n" result << "export PATH=\$PWD/nextflow-bin:\$PATH\n" diff --git a/plugins/nf-ga4gh/src/main/nextflow/ga4gh/tes/executor/TesTaskHandler.groovy b/plugins/nf-ga4gh/src/main/nextflow/ga4gh/tes/executor/TesTaskHandler.groovy index 2d26b1ee83..d6dfb25b28 100644 --- a/plugins/nf-ga4gh/src/main/nextflow/ga4gh/tes/executor/TesTaskHandler.groovy +++ b/plugins/nf-ga4gh/src/main/nextflow/ga4gh/tes/executor/TesTaskHandler.groovy @@ -190,6 +190,11 @@ class TesTaskHandler extends TaskHandler { body.addInputsItem(inItem(scriptFile)) body.addInputsItem(inItem(wrapperFile)) + Path remoteBinDir = executor.getRemoteBinDir() + if (remoteBinDir) { + body.addInputsItem(inItem(remoteBinDir, null, true)) + } + // add task input files if(inputFile.exists()) body.addInputsItem(inItem(inputFile)) @@ -234,11 +239,12 @@ class TesTaskHandler extends TaskHandler { return size != null ? ((double)size.bytes)/1073741824 : null } - private TesInput inItem( Path realPath, String fileName = null) { + private TesInput inItem( Path realPath, String fileName = null, boolean isBin = false) { def result = new TesInput() result.url = realPath.toUriString() result.path = fileName ? "$WORK_DIR/$fileName" : "$WORK_DIR/${realPath.getName()}" log.trace "[TES] Adding INPUT file: $result" + result.path = isBin ? realPath : result.path return result }