Skip to content

Commit

Permalink
Install package just before download
Browse files Browse the repository at this point in the history
  • Loading branch information
drernie committed Jan 27, 2024
1 parent 19a588c commit 55a47b2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## [0.7.7] 2024-01-24

- Properly implement and test getFilename()
- Pre-install package if "&path" present
- Install package just before download
- Add and pass `path-input` integration test
- Add unit test for "&path=" Quilt+ URIs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,6 @@ class QuiltPackage {
void setup() {
Files.createDirectories(this.folder)
this.installed = false
if (this.parsed.hasPath()) {
install()
}
}

boolean is_force() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import groovy.util.logging.Slf4j
import nextflow.Global
import nextflow.Session
import nextflow.quilt.jep.QuiltParser
import nextflow.quilt.jep.QuiltPackage
import nextflow.file.FileSystemTransferAware
import nextflow.file.CopyOptions
import nextflow.file.FileHelper
Expand Down Expand Up @@ -112,6 +113,11 @@ class QuiltFileSystemProvider extends FileSystemProvider implements FileSystemTr
// log.debug "QuiltFileSystemProvider.download: ${remoteFile} -> ${localDestination}"
QuiltPath qPath = asQuiltPath(remoteFile)
Path cachedFile = qPath.localPath()
QuiltPackage pkg = qPath.pkg()
if (!pkg.installed) {
pkg.install()
}

if (!Files.exists(cachedFile)) {
throw new NoSuchFileException(remoteFile.toString())
}
Expand Down

0 comments on commit 55a47b2

Please sign in to comment.