Patch file is removed when previewing an update diff
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 322
- Forks
- 255
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 5
Description
Description of the bug
If there is a patch diff file that would be regenerated by running: nfcore modules update name/name, the existing file is removed even when users select "Preview diff in terminal, choose whether to update files", and ultimately select no in the update choice prompt.
Command used and terminal output
1. `pixi run nf-core modules update star/genomegenerate`
2. Select "Preview diff in terminal, choose whether to update files"
3. Select no.
tools output:
? Do you want to view diffs of the proposed changes? Preview diff in terminal, choose whether to update files
INFO Found patch for module 'nf-core/star/genomegenerate'. Trying to apply it to new files
INFO Modules star/genomegenerate contains a patch file.
WARNING Failed to apply patch for module 'nf-core/star/genomegenerate'. You will have to apply the patch manually
WARNING Failed to patch module 'modules/nf-core/star/genomegenerate'. Will proceed with unpatched files.
WARNING Current installation is compared against unpatched version in remote.
INFO Changes in component 'nf-core/star/genomegenerate' between (cc08a888069f67cab8120259bddab8032d4c0fe3) and (481efe07277c76e23738b4be0724ba7d99653d7e)
INFO 'modules/nf-core/star/genomegenerate/star-genomegenerate.diff' was created
INFO 'modules/nf-core/star/genomegenerate/environment.yml' was created
INFO Changes in 'star/genomegenerate/meta.yml':
INFO Changes in 'star/genomegenerate/main.nf':
INFO 'modules/nf-core/star/genomegenerate/tests/main.nf.test.snap' was created
INFO 'modules/nf-core/star/genomegenerate/tests/main.nf.test' was created
git history:
deleted: modules/nf-core/star/genomegenerate/star-genomegenerate.diff
System information
Nextflow version: 25.10.2
Hardware: Desktop
Executor: local
OS: Ubuntu
Version of nf-core/tools: 3.5.2
Python version: 3.12.5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with pixi run nf-core modules update star/genomegenerate, preview the diff, and select no. Start by tracing the module update and diff-preview flow that handles modules/nf-core/star/genomegenerate/star-genomegenerate.diff. Done means declining the update leaves the existing patch file intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100