Fix: Allow running pipelines from local file:/ Git repositories in offline mode #6007
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 )
toif( 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
export NXF_OFFLINE='true'
)git clone [email protected]:nf-core/rnaseq.git --bare
)./launch.sh run 'file:/path/to/local_pipelines/rnaseq.git' -r 3.18.0 -profile test