-
Notifications
You must be signed in to change notification settings - Fork 192
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
Bad behavior when .nf-core.yml is absent from current directory #3340
Comments
Hello @AlexVCaron, |
For specifically your project can you not just add the YAML file? Backporting fixes is a lot of work for us, so is only something we'd consider in pretty extreme cases. |
I was inquiring, since it touches two close versions. It's no problem, we'll create the file manually for now and add warnings in our doc. Thanks ! |
So, I have wrestled with this method over and over and I was somewhat surprised to see this error reported again after it has been addressed several times: Issue #2421 I note that you are on I think that, absent an attempt to patch |
Thnk you very much ! We are planning to upgrade our stack soon, to get to the latest |
Description of the bug
Basic setup :
Context
Calling install commands for any component, nf-core will first try to identify the directory by finding a .nf-core.yml file. If absent, the command traverses the parent directories to find a base directory that is either a pipeline or a module repository.
Current behavior :
If there is a .nf-core.yml file somewhere there, the command selects the right parent as its base directory, which is valid.
However, if there is none, the command selects the deepest parent in the current directory's tree, which ends up evaluating to / in pretty much all cases, potentially really bad !
Expected behavior :
If no .nf-core.yml file is found, the selected directory should be the current directory.
Cause of the bug :
The bad behavior of determine_base_dir in this current context, caused by this line.
I'd be happy to open a PR and fix this if needed, just tell me ! It would be great however if this fix could patch version 2.14, as my project is bound to it for the time being.
Command used and terminal output
I can add the terminal output if you need, but it is uninformative (basically tells you it selected / and gives no errors) and I already know where the bug is and how to fix it.
System information
nf-core 2.14.1, but I checked the code and the problem is still present in 3.0.2 and on the master branch
The text was updated successfully, but these errors were encountered: