-
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
Template: Fix process.shell
in nextflow.config
#3416
Conversation
dev -> main for 3.1.2
@nf-core-bot changelog |
process.shell
in nextflow.config
process.shell
in nextflow.config
This isn't working. |
We still have the |
No. It produces the header:
which doesn't work. Anything after |
Interesting. Is this because it's This is what we had for many years, which I think worked? process.shell = ['/bin/bash', '-euo', 'pipefail'] |
Yes, exactly. |
Where is |
Ok slowly working my way through what's happened here. I think:
@jorgee has a nice solution to add the
This then means that the script only works with // Set bash options
process.shell = [
"/usr/bin/env",
"-S", // Allows split string for /usr/bin/env
"bash",
"-C", // No clobber - prevent output redirection from overwriting files.
"-e", // Exit if a tool returns a non-zero status/exit code
"-u", // Treat unset variables and parameters as an error
"-o pipefail" // Returns the status of the last command to exit with a non-zero status or zero if all successfully execute
] Thoughts? |
I tried |
See also nextflow-io/nextflow#5684 |
I think it should be:
|
The latest Nextflow edge release included some changes in how the bash shell command is used. This surfaced a problem that was introduced into the pipeline template in #2991 - the
process.shell
directive should be either a single-line or a list, not a multi-line string (as far as I can tell, there was no way for us to know this).Reverting this to go back to using a list as before, which solves the problem found in nextflow-io/nextflow#5686
See also nextflow-io/nextflow#5689 which strengthens Nextflow's validation logic for this directive. Once that is merged and released, pipelines with the multi-line string above will not run and instead fail with an error.