Skip to content

nextflow pull: unexpected behaviour after using -r #1334

@ewels

Description

@ewels

Bug report

After using -r with nextflow pull to pull a specific version of a pipeline, I would expect running nextflow pull a second time to check out the latest version of the code. Instead, it leaves the assets repo HEAD pointing to the previous -r tag.

I could imagine this causing problems for users who want to run a pipeline once with an old version of the pipeline code who then go back to using their "normal" command without the -r flag.

Expected behaviour

$ nextflow pull nf-core/rnaseq -r 1.1
Checking nf-core/rnaseq ...
done - revision: 1cd5ab733a [1.1]

$ nextflow pull nf-core/rnaseq
Checking nf-core/rnaseq ...
Already-up-to-date - revision: 37f260d360 [master]

Actual behaviour

$ nextflow pull nf-core/rnaseq -r 1.1
Checking nf-core/rnaseq ...
done - revision: 1cd5ab733a [1.1]

$ nextflow pull nf-core/rnaseq
Checking nf-core/rnaseq ...
done - revision: 1cd5ab733a [1.1]

Forcing the second command with an explicit -r master solves the issue, but this isn't ideal.

Steps to reproduce the problem

Pull an nf-core pipeline using nextflow pull. Then pull a specific (old) release using -r. Then pull it again without this.

Environment

$ nextflow -version

      N E X T F L O W
      version 19.09.0-edge build 5167
      created 16-09-2019 21:15 UTC (23:15 CEST)
      cite doi:10.1038/nbt.3820
      http://nextflow.io

$ java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.6
BuildVersion:	18G95

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions