scilus / nf-scil

SCIL Nextflow Toolbox
GNU General Public License v3.0
1 stars 17 forks source link

[FIX] Detached HEAD problem with nf-core commands #168

Closed AlexVCaron closed 18 hours ago

AlexVCaron commented 1 week ago

Bug category

Describe the bug

Inside the devcontainer, nf-core commands that clone the repository in their actions are affected by the new environment variables for git-remote and branch. It is caused by a bad specification of the branch when building the devcontainer, fetching the remote name instead of the local one.

This fixes it. First, it checks if there is a remote branch associated to the current one in the repository. If there is, it specifies the local branch name. Else, because the clone that nf-core creates on his side does not have copies the local branches, it simply specifies main.

Steps to reproduce the bug

  1. Ensure your devcontainer is fully up-to-date with the main (not this PR!). If you cannot reproduce, delete all containers and volumes associated to it (their names should start with nf-scil) and rebuild.
  2. Check your environment variables with env | grep NFCORE and verify the branch variables points to remote names
  3. Call nf-core --verbose modules test denoise/mppca --once. After the repo clone is done, you can ctrl+c, no need to wait
  4. Call the command again, git commands called by nf-core should lead to an error
AlexVCaron commented 1 week ago

@ThoumyreStanislas Can you checkout this PR locally, rebuild your container, delete ~/.config/nfcore/scilus/nf-scil and try to launch tests like I describe in the steps to reproduce the bug (step 2 to 4) ? It should fix your problems,but I want to be sure.