Skip to content

Commit 02ba0c7

Browse files
committed
Update index file default for single file
Signed-off-by: Ben Sherman <[email protected]>
1 parent b8cf823 commit 02ba0c7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

modules/nextflow/src/main/groovy/nextflow/extension/PublishOp.groovy

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,10 @@ class PublishOp {
121121
* @param value
122122
*/
123123
protected Object normalizePaths(value) {
124-
if( value instanceof Path )
125-
return List.of(normalizePath(value))
124+
if( value instanceof Path ) {
125+
final target = normalizePath(value)
126+
return List.of(targetDir.relativize(target), target)
127+
}
126128

127129
if( value instanceof Collection ) {
128130
return value.collect { el ->

modules/nextflow/src/test/groovy/nextflow/script/OutputDslTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class OutputDslTest extends Specification {
7070
target.resolve('foo/file1.txt').text == 'Hello'
7171
target.resolve('barbar/file2.txt').text == 'world'
7272
target.resolve('barbar/index.csv').text == """\
73-
"${target}/barbar/file2.txt"
73+
"file2.txt","${target}/barbar/file2.txt"
7474
""".stripIndent()
7575
and:
7676
1 * session.notifyFilePublish(target.resolve('foo/file1.txt'), file1)

0 commit comments

Comments
 (0)