Skip to content

Commit

Permalink
Manifest readManifestFromDirectory
Browse files Browse the repository at this point in the history
replaces Path getManifestPath(
  • Loading branch information
drernie committed Dec 22, 2024
1 parent 51537d5 commit 6826568
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions plugins/nf-quilt/src/test/nextflow/quilt/QuiltSpecification.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import java.nio.file.Paths
import java.nio.file.Path
import java.nio.file.attribute.BasicFileAttributes
import java.nio.file.spi.FileSystemProvider
import java.util.jar.Manifest

import nextflow.plugin.Plugins
import nextflow.plugin.TestPluginDescriptorFinder
Expand Down Expand Up @@ -80,8 +81,16 @@ class QuiltSpecification extends Specification {
return new TestPluginDescriptorFinder(){

@Override
protected Path getManifestPath(Path pluginPath) {
return pluginPath.resolve('src/resources/META-INF/MANIFEST.MF')
protected Manifest readManifestFromDirectory(Path pluginPath) {
if ( !Files.isDirectory(pluginPath) )
return null

final manifestPath = pluginPath.resolve('src/resources/META-INF/MANIFEST.MF')
if ( !Files.exists(manifestPath) )
return null

final input = Files.newInputStream(manifestPath)
return new Manifest(input)
}

}
Expand Down

0 comments on commit 6826568

Please sign in to comment.