Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nz-mtra
Copy link

@nz-mtra nz-mtra commented Apr 24, 2025

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

Copy link

netlify bot commented Apr 24, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 0a4da4e
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/680a7d6a43352c0008cbc83e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Offline mode (NXF_OFFLINE='true') prevents running pipelines from local file:/ bare Git repositories
1 participant