nextflow
nextflow copied to clipboard
Fix: Allow running pipelines from local file:/ Git repositories in offline mode
Description
This PR fixes an issue where Nextflow's offline mode incorrectly prevented running pipelines specified via local Git repository URIs starting with file:/. The existing offline check would throw an exception before the AssetManager could handle the local path.
This change modifies the offline check to specifically permit file:/ URIs, allowing AssetManager to correctly set up the pipeline from the local clone even when offline mode is active.
Related issue
Fixes #6006
Changes made:
On line 588 of nextflow/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy, changed if( offline ) to if( offline && !pipelineName.startsWith('file:/') ).
This ensures the AbortOperationException is only thrown in offline mode when the pipelineName does not represent a local file:/ path.
How to test
- Clone the branch, go to branch, compile
- Set NXF_OFFLINE variable to true (
export NXF_OFFLINE='true') - Download a bare git repo of a pipeline to a local. (Eg.
git clone [email protected]:nf-core/rnaseq.git --bare) - Run the pipeline from the nextflow repo:
./launch.sh run 'file:/path/to/local_pipelines/rnaseq.git' -r 3.18.0 -profile test
Deploy Preview for nextflow-docs-staging canceled.
| Name | Link |
|---|---|
| Latest commit | 79ccc323195506bf4831a8e79a995b1b52248f0b |
| Latest deploy log | https://app.netlify.com/projects/nextflow-docs-staging/deploys/689b1c23b16e480008da3a8d |