nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Fix: Allow running pipelines from local file:/ Git repositories in offline mode

Open nz-mtra opened this issue 7 months ago • 1 comments

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

  1. Clone the branch, go to branch, compile
  2. Set NXF_OFFLINE variable to true (export NXF_OFFLINE='true')
  3. Download a bare git repo of a pipeline to a local. (Eg. git clone [email protected]:nf-core/rnaseq.git --bare)
  4. Run the pipeline from the nextflow repo: ./launch.sh run 'file:/path/to/local_pipelines/rnaseq.git' -r 3.18.0 -profile test

nz-mtra avatar Apr 24 '25 18:04 nz-mtra

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

netlify[bot] avatar Apr 24 '25 18:04 netlify[bot]